{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"import numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\nimport cv2\nimport matplotlib.pyplot as plt\nimport seaborn as sns\nimport os","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2023-06-03T13:01:36.158995Z","iopub.execute_input":"2023-06-03T13:01:36.159389Z","iopub.status.idle":"2023-06-03T13:01:36.165115Z","shell.execute_reply.started":"2023-06-03T13:01:36.159359Z","shell.execute_reply":"2023-06-03T13:01:36.163895Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import tensorflow as tf\nfrom keras import backend as K","metadata":{"execution":{"iopub.status.busy":"2023-06-03T13:01:36.167896Z","iopub.execute_input":"2023-06-03T13:01:36.168298Z","iopub.status.idle":"2023-06-03T13:01:36.179354Z","shell.execute_reply.started":"2023-06-03T13:01:36.168273Z","shell.execute_reply":"2023-06-03T13:01:36.178073Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"dir_monet = \"/kaggle/input/gan-getting-started/monet_jpg/\"\ndir_photo = \"/kaggle/input/gan-getting-started/photo_jpg/\"\nfiles_monet = os.listdir(dir_monet)\nfiles_photo = os.listdir(dir_photo)","metadata":{"execution":{"iopub.status.busy":"2023-06-03T13:01:36.181146Z","iopub.execute_input":"2023-06-03T13:01:36.181466Z","iopub.status.idle":"2023-06-03T13:01:36.196581Z","shell.execute_reply.started":"2023-06-03T13:01:36.181436Z","shell.execute_reply":"2023-06-03T13:01:36.195809Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"## Style Image","metadata":{}},{"cell_type":"code","source":"#42 & 72","metadata":{"execution":{"iopub.status.busy":"2023-06-03T13:01:36.197875Z","iopub.execute_input":"2023-06-03T13:01:36.199143Z","iopub.status.idle":"2023-06-03T13:01:36.203579Z","shell.execute_reply.started":"2023-06-03T13:01:36.199106Z","shell.execute_reply":"2023-06-03T13:01:36.202825Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"ID = 42\nstyle_image0 = cv2.imread(dir_monet +  files_monet[ID])\nplt.imshow(style_image0[:,:,::-1])","metadata":{"execution":{"iopub.status.busy":"2023-06-03T13:01:36.205517Z","iopub.execute_input":"2023-06-03T13:01:36.206339Z","iopub.status.idle":"2023-06-03T13:01:36.515360Z","shell.execute_reply.started":"2023-06-03T13:01:36.206300Z","shell.execute_reply":"2023-06-03T13:01:36.514137Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"## Content Image","metadata":{}},{"cell_type":"code","source":"ID = 72\ncontent_image0 = cv2.imread(dir_photo +  files_photo[ID])\nplt.imshow(content_image0[:,:,::-1])","metadata":{"execution":{"iopub.status.busy":"2023-06-03T13:01:36.516572Z","iopub.execute_input":"2023-06-03T13:01:36.516829Z","iopub.status.idle":"2023-06-03T13:01:36.830808Z","shell.execute_reply.started":"2023-06-03T13:01:36.516807Z","shell.execute_reply":"2023-06-03T13:01:36.829760Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"content_image0.shape","metadata":{"execution":{"iopub.status.busy":"2023-06-03T13:01:36.831897Z","iopub.execute_input":"2023-06-03T13:01:36.832167Z","iopub.status.idle":"2023-06-03T13:01:36.839546Z","shell.execute_reply.started":"2023-06-03T13:01:36.832145Z","shell.execute_reply":"2023-06-03T13:01:36.838159Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"## Functions","metadata":{}},{"cell_type":"code","source":"def preprocess_image(image):\n    \n    image = tf.cast(image, dtype=tf.float32)\n    image = tf.keras.applications.vgg19.preprocess_input(image)\n    \n    image = tf.reshape(image, shape = (1,256,256,3))\n    \n    return image","metadata":{"execution":{"iopub.status.busy":"2023-06-03T13:01:36.842422Z","iopub.execute_input":"2023-06-03T13:01:36.842835Z","iopub.status.idle":"2023-06-03T13:01:36.850718Z","shell.execute_reply.started":"2023-06-03T13:01:36.842769Z","shell.execute_reply":"2023-06-03T13:01:36.849704Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"K.clear_session()\ntmp_vgg = tf.keras.applications.vgg19.VGG19()\ntmp_vgg.summary()\ndel tmp_vgg","metadata":{"execution":{"iopub.status.busy":"2023-06-03T13:01:36.851790Z","iopub.execute_input":"2023-06-03T13:01:36.852149Z","iopub.status.idle":"2023-06-03T13:01:39.223325Z","shell.execute_reply.started":"2023-06-03T13:01:36.852119Z","shell.execute_reply":"2023-06-03T13:01:39.221324Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"style_layers = ['block1_conv1', \n                'block2_conv1', \n                'block3_conv1', \n                'block4_conv1',\n                'block5_conv1'\n               ] \n\nlayer_weights = [0.3, 0.7, 1.8, 1.8, 0.7]\n\ncontent_layers = ['block5_conv4']\n\noutput_layers =  style_layers + content_layers\n\nNUM_CONTENT_LAYERS = len(content_layers)\nNUM_STYLE_LAYERS = len(style_layers)\n\nprint(NUM_CONTENT_LAYERS, NUM_STYLE_LAYERS)","metadata":{"execution":{"iopub.status.busy":"2023-06-03T13:30:04.063921Z","iopub.execute_input":"2023-06-03T13:30:04.064295Z","iopub.status.idle":"2023-06-03T13:30:04.071113Z","shell.execute_reply.started":"2023-06-03T13:30:04.064267Z","shell.execute_reply":"2023-06-03T13:30:04.069530Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"def vgg_model(layer_names):\n    vgg = tf.keras.applications.vgg19.VGG19(include_top=False, weights='imagenet', input_shape=(256,256,3))\n    vgg.trainable = False\n    outputs = [vgg.get_layer(name).output for name in layer_names]\n    model = tf.keras.Model(inputs=vgg.input, outputs=outputs)\n    \n    return model","metadata":{"execution":{"iopub.status.busy":"2023-06-03T13:30:04.656058Z","iopub.execute_input":"2023-06-03T13:30:04.657254Z","iopub.status.idle":"2023-06-03T13:30:04.663964Z","shell.execute_reply.started":"2023-06-03T13:30:04.657203Z","shell.execute_reply":"2023-06-03T13:30:04.662066Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# clear session to make layer naming consistent if re-running the cell\nK.clear_session()\n\n# create a vgg-19 model\nvgg = vgg_model(output_layers)\nvgg.summary()","metadata":{"execution":{"iopub.status.busy":"2023-06-03T13:30:04.969337Z","iopub.execute_input":"2023-06-03T13:30:04.969746Z","iopub.status.idle":"2023-06-03T13:30:05.517739Z","shell.execute_reply.started":"2023-06-03T13:30:04.969711Z","shell.execute_reply":"2023-06-03T13:30:05.516103Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"def get_style_loss(features, targets):\n\n    style_loss = tf.reduce_mean(tf.square(features - targets))\n    \n    return style_loss\n\n\ndef get_content_loss(features, targets):\n    \n    content_loss = 0.5 * tf.reduce_sum(tf.square(features - targets))\n    \n    return content_loss\n\n\ndef gram_matrix(input_tensor):\n    gram = tf.linalg.einsum('bijc,bijd->bcd', input_tensor, input_tensor) \n    input_shape = tf.shape(input_tensor) \n    height = input_shape[1] \n    width = input_shape[2] \n\n    num_locations = tf.cast(height * width, tf.float32)\n    scaled_gram = gram / num_locations\n    \n    return scaled_gram","metadata":{"execution":{"iopub.status.busy":"2023-06-03T13:30:05.519864Z","iopub.execute_input":"2023-06-03T13:30:05.520215Z","iopub.status.idle":"2023-06-03T13:30:05.528507Z","shell.execute_reply.started":"2023-06-03T13:30:05.520184Z","shell.execute_reply":"2023-06-03T13:30:05.527127Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"def cal_style_loss(generated_image, style_image):\n    v1 = vgg(generated_image)[:-1]\n    v2 = vgg(style_image)[:-1]\n\n    style_losses = []\n\n    for i in range(5):\n        style_loss = get_style_loss(v1[i], v2[i])\n        style_losses.append(style_loss)\n\n    return tf.add_n(style_losses)","metadata":{"execution":{"iopub.status.busy":"2023-06-03T13:30:05.841424Z","iopub.execute_input":"2023-06-03T13:30:05.841816Z","iopub.status.idle":"2023-06-03T13:30:05.849673Z","shell.execute_reply.started":"2023-06-03T13:30:05.841785Z","shell.execute_reply":"2023-06-03T13:30:05.848292Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"def get_style_image_features(image):  \n\n    #preprocessed_style_image = preprocess_image(image) \n\n    outputs = vgg(image) \n\n    style_outputs = outputs[:NUM_STYLE_LAYERS] \n\n    gram_style_features = [gram_matrix(style_layer) for style_layer in style_outputs] \n    \n    return gram_style_features","metadata":{"execution":{"iopub.status.busy":"2023-06-03T13:30:06.074416Z","iopub.execute_input":"2023-06-03T13:30:06.074762Z","iopub.status.idle":"2023-06-03T13:30:06.080248Z","shell.execute_reply.started":"2023-06-03T13:30:06.074734Z","shell.execute_reply":"2023-06-03T13:30:06.079175Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"def get_content_image_features(image):\n\n    #preprocessed_content_image = preprocess_image(image)\n\n    outputs = vgg(image) \n\n    content_outputs = outputs[NUM_STYLE_LAYERS:]\n\n    return content_outputs","metadata":{"execution":{"iopub.status.busy":"2023-06-03T13:30:06.296806Z","iopub.execute_input":"2023-06-03T13:30:06.297221Z","iopub.status.idle":"2023-06-03T13:30:06.303584Z","shell.execute_reply.started":"2023-06-03T13:30:06.297188Z","shell.execute_reply":"2023-06-03T13:30:06.302067Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"def get_style_content_loss(style_targets, style_outputs, content_targets, \n                           content_outputs, style_weight, content_weight):\n    \n    # sum of the style losses\n    \n    style_losses = [ get_style_loss(style_output, style_target)\n                           for style_output, style_target in zip(style_outputs, style_targets)]\n    \n    \n    for i in range(len(style_losses)):\n        style_losses[i] =  style_losses[i]*layer_weights[i]\n        \n    \n    style_loss = tf.add_n(style_losses)\n\n    # Sum up the content losses\n    content_loss = tf.add_n([get_content_loss(content_output, content_target)\n                           for content_output, content_target in zip(content_outputs, content_targets)])\n\n    # scale the style loss by multiplying by the style weight and dividing by the number of style layers\n    style_loss = style_loss * style_weight / NUM_STYLE_LAYERS \n    \n    sloss_list.append(style_loss)\n\n    # scale the content loss by multiplying by the content weight and dividing by the number of content layers\n    content_loss = content_loss * content_weight / NUM_CONTENT_LAYERS \n    closs_list.append(content_loss)\n\n    # sum up the style and content losses\n    total_loss = style_loss + content_loss \n\n    return total_loss","metadata":{"execution":{"iopub.status.busy":"2023-06-03T13:30:06.487272Z","iopub.execute_input":"2023-06-03T13:30:06.487666Z","iopub.status.idle":"2023-06-03T13:30:06.496693Z","shell.execute_reply.started":"2023-06-03T13:30:06.487637Z","shell.execute_reply":"2023-06-03T13:30:06.495712Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"def calculate_gradients(image, style_targets, content_targets, \n                        style_weight, content_weight, var_weight):\n\n    with tf.GradientTape() as tape:\n\n        style_features = get_style_image_features(image) \n\n        content_features = get_content_image_features(image) \n\n        loss = get_style_content_loss(style_targets, style_features, content_targets, content_features, style_weight, content_weight) \n        \n        loss_list.append(loss)\n\n    gradients = tape.gradient(loss, image) \n\n    return gradients","metadata":{"execution":{"iopub.status.busy":"2023-06-03T13:30:06.668296Z","iopub.execute_input":"2023-06-03T13:30:06.668663Z","iopub.status.idle":"2023-06-03T13:30:06.674473Z","shell.execute_reply.started":"2023-06-03T13:30:06.668634Z","shell.execute_reply":"2023-06-03T13:30:06.673654Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"def update_image_with_style(image, style_targets, content_targets, style_weight, \n                            var_weight, content_weight, optimizer):\n    \n    gradients = calculate_gradients(image, style_targets, content_targets, style_weight, content_weight, var_weight) \n    \n    optimizer.apply_gradients([(gradients, image)]) \n    \n    image.assign(clip_image_values(image, min_value=0.0, max_value=255.0))","metadata":{"execution":{"iopub.status.busy":"2023-06-03T13:30:06.832517Z","iopub.execute_input":"2023-06-03T13:30:06.832937Z","iopub.status.idle":"2023-06-03T13:30:06.840010Z","shell.execute_reply.started":"2023-06-03T13:30:06.832906Z","shell.execute_reply":"2023-06-03T13:30:06.838218Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"def clip_image_values(image, min_value=0.0, max_value=255.0):\n    return tf.clip_by_value(image, clip_value_min=min_value, clip_value_max=max_value)","metadata":{"execution":{"iopub.status.busy":"2023-06-03T13:30:06.990962Z","iopub.execute_input":"2023-06-03T13:30:06.991314Z","iopub.status.idle":"2023-06-03T13:30:06.996076Z","shell.execute_reply.started":"2023-06-03T13:30:06.991289Z","shell.execute_reply":"2023-06-03T13:30:06.995209Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"def convert_images(generated_image):\n    img2 =  np.array(generated_image[0]).copy()\n    img2 = img2[:,:,::-1]\n    img2[:,:,0] = img2[:,:,0] + 127.5\n    img2[:,:,1] = img2[:,:,1] + 127.5\n    img2[:,:,2] = img2[:,:,2] + 127.5\n    \n    filter1 =  img2 < 0\n    img2[filter1] = 0\n    filter1 =  img2 > 255\n    img2[filter1] = 255\n    \n    return img2.astype(int)[:,:,::-1]","metadata":{"execution":{"iopub.status.busy":"2023-06-03T13:30:07.546273Z","iopub.execute_input":"2023-06-03T13:30:07.546657Z","iopub.status.idle":"2023-06-03T13:30:07.554539Z","shell.execute_reply.started":"2023-06-03T13:30:07.546629Z","shell.execute_reply":"2023-06-03T13:30:07.552780Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"## Training Image","metadata":{}},{"cell_type":"code","source":"\nstyle_weight=1e-2\ncontent_weight=1e-17\nvar_weight=0\n#optimizer= tf.keras.optimizers.Adam(learning_rate=0.01)\n\n#optimizer = tf.keras.optimizers.RMSprop(learning_rate=0.1)","metadata":{"execution":{"iopub.status.busy":"2023-06-03T13:34:26.655546Z","iopub.execute_input":"2023-06-03T13:34:26.655946Z","iopub.status.idle":"2023-06-03T13:34:26.661865Z","shell.execute_reply.started":"2023-06-03T13:34:26.655917Z","shell.execute_reply":"2023-06-03T13:34:26.660296Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#generated_image = tf.cast(content_image0[:,:,::-1], dtype=tf.float32)\ngenerated_image = preprocess_image(content_image0)\ngenerated_image = tf.Variable(generated_image) ","metadata":{"execution":{"iopub.status.busy":"2023-06-03T13:34:27.099609Z","iopub.execute_input":"2023-06-03T13:34:27.100028Z","iopub.status.idle":"2023-06-03T13:34:27.108804Z","shell.execute_reply.started":"2023-06-03T13:34:27.099997Z","shell.execute_reply":"2023-06-03T13:34:27.107415Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"content_image = preprocess_image(content_image0)\nstyle_image =  preprocess_image(style_image0)","metadata":{"execution":{"iopub.status.busy":"2023-06-03T13:34:27.365985Z","iopub.execute_input":"2023-06-03T13:34:27.366367Z","iopub.status.idle":"2023-06-03T13:34:27.377345Z","shell.execute_reply.started":"2023-06-03T13:34:27.366339Z","shell.execute_reply":"2023-06-03T13:34:27.376326Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"style_targets = get_style_image_features(style_image)\ncontent_targets = get_content_image_features(content_image)","metadata":{"execution":{"iopub.status.busy":"2023-06-03T13:34:27.673056Z","iopub.execute_input":"2023-06-03T13:34:27.673464Z","iopub.status.idle":"2023-06-03T13:34:28.420550Z","shell.execute_reply.started":"2023-06-03T13:34:27.673424Z","shell.execute_reply":"2023-06-03T13:34:28.419911Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"initial_image = convert_images(generated_image)\n#plt.imshow(initial_image)","metadata":{"execution":{"iopub.status.busy":"2023-06-03T13:34:28.421540Z","iopub.execute_input":"2023-06-03T13:34:28.421742Z","iopub.status.idle":"2023-06-03T13:34:28.713259Z","shell.execute_reply.started":"2023-06-03T13:34:28.421724Z","shell.execute_reply":"2023-06-03T13:34:28.712225Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"def plot_two(ITR):\n    processed_image = convert_images(generated_image)\n    \n    fig, ax = plt.subplots(1, 2, figsize = (13, 6))\n    ax[0].imshow(initial_image)\n    ax[1].imshow(processed_image)\n    ax[0].set_title(\"Original Image\")\n    ax[1].set_title(\"Style Transfer \" + str(ITR) + \" steps\")","metadata":{"execution":{"iopub.status.busy":"2023-06-03T13:34:31.065965Z","iopub.execute_input":"2023-06-03T13:34:31.066715Z","iopub.status.idle":"2023-06-03T13:34:31.073597Z","shell.execute_reply.started":"2023-06-03T13:34:31.066682Z","shell.execute_reply":"2023-06-03T13:34:31.071951Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"LR = 0.005\nloss_list = []\ncloss_list = []\nsloss_list = []","metadata":{"execution":{"iopub.status.busy":"2023-06-03T13:34:31.496004Z","iopub.execute_input":"2023-06-03T13:34:31.496342Z","iopub.status.idle":"2023-06-03T13:34:31.502028Z","shell.execute_reply.started":"2023-06-03T13:34:31.496316Z","shell.execute_reply":"2023-06-03T13:34:31.500622Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"epoch = 100\nfor ITR in range(epoch):\n    \n    if ITR % 10 == 0:\n        print(ITR)\n    \n    if ITR % 20 == 0:\n        LR = LR*0.94\n    gradients = calculate_gradients(generated_image, style_targets, content_targets, style_weight, content_weight, var_weight)\n    #optimizer.apply_gradients([(gradients, generated_image)]) \n    \n    generated_image = generated_image - LR*gradients\n    \n    generated_image = tf.Variable(generated_image) \n    \n    #clip_image_values(image, min_value=0.0, max_value=255.0)\n    \n    generated_image.assign(clip_image_values(generated_image, min_value=-127.5, max_value=127.5))\n    ","metadata":{"execution":{"iopub.status.busy":"2023-06-03T13:34:43.284393Z","iopub.execute_input":"2023-06-03T13:34:43.284731Z","iopub.status.idle":"2023-06-03T13:39:23.971771Z","shell.execute_reply.started":"2023-06-03T13:34:43.284708Z","shell.execute_reply":"2023-06-03T13:39:23.971060Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"fig, ax = plt.subplots(1,3, figsize = (14,4))\n\nax[0].plot(sloss_list)\nax[1].plot(closs_list)\nax[2].plot(loss_list)\n\ntitles = [\"style loss\", \"content loss\", \"total loss\"]\nfor i in range(3):\n    ax[i].set_title(titles[i])","metadata":{"execution":{"iopub.status.busy":"2023-06-03T13:39:23.975617Z","iopub.execute_input":"2023-06-03T13:39:23.978125Z","iopub.status.idle":"2023-06-03T13:39:24.529512Z","shell.execute_reply.started":"2023-06-03T13:39:23.978089Z","shell.execute_reply":"2023-06-03T13:39:24.528074Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"plot_two(ITR)","metadata":{"execution":{"iopub.status.busy":"2023-06-03T13:39:24.531054Z","iopub.execute_input":"2023-06-03T13:39:24.531373Z","iopub.status.idle":"2023-06-03T13:39:25.287731Z","shell.execute_reply.started":"2023-06-03T13:39:24.531348Z","shell.execute_reply":"2023-06-03T13:39:25.286576Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"processed_image = convert_images(generated_image)","metadata":{"execution":{"iopub.status.busy":"2023-06-03T13:39:25.290251Z","iopub.execute_input":"2023-06-03T13:39:25.290572Z","iopub.status.idle":"2023-06-03T13:39:25.301317Z","shell.execute_reply.started":"2023-06-03T13:39:25.290543Z","shell.execute_reply":"2023-06-03T13:39:25.299894Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"fig, ax = plt.subplots(1, 3, figsize = (16, 6))\nax[0].imshow(initial_image)\nax[1].imshow(style_image0[:,:,::-1])\nax[2].imshow(processed_image)\nax[0].set_title(\"Original Image\")\nax[1].set_title(\"Style Image\")\nax[2].set_title(\"Style Transfer\")","metadata":{"execution":{"iopub.status.busy":"2023-06-03T13:39:25.302340Z","iopub.execute_input":"2023-06-03T13:39:25.302626Z","iopub.status.idle":"2023-06-03T13:39:26.179828Z","shell.execute_reply.started":"2023-06-03T13:39:25.302599Z","shell.execute_reply":"2023-06-03T13:39:26.178925Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}