print('current loss value:'min_valif ( + = or = save current generated image only every iterations img copy(reshape((img_heightimg_width )img deprocess_image(imgfname result_prefix '_at_iteration_% png%( + imsave(fnameimgprint('image saved as'fnameend_time time time(print('iteration % completed in %ds( + end_time start_time)it must be pretty evident by now that neural style transfer is computationally expensive task for the set of images in considerationeach iteration took between - seconds on intel cpu with gb ram on an averageeach iteration takes around seconds but if you run multiple networks togethereach iteration takes up to , seconds you may observe speedups if the same is done using gpus the following is the output of some of the iterations we print the loss and time taken for each iteration and save the image after five iterations start of iteration current loss value + image saved as style_transfer_result_city_road_gatys_at_iteration_ png iteration completed in start of iteration current loss value + iteration completed in start of iteration current loss value + iteration completed in start of iteration current loss value + iteration completed in start of iteration current loss value + image saved as style_transfer_result_city_road_gatys_at_iteration_ png iteration completed in start of iteration current loss value + iteration completed in start of iteration current loss value + image saved as style_transfer_result_city_road_gatys_at_iteration_ png iteration completed in now you'll learn how the neural style transfer has worked out for the images in consideration remember that we performed checkpoint outputs after certain iterations for every pair of style and content images