Skip to content

Instantly share code, notes, and snippets.

@ArnoutDevos
Created January 8, 2018 14:07
Show Gist options
  • Save ArnoutDevos/f42414e971d159a42e34255b35369701 to your computer and use it in GitHub Desktop.
Save ArnoutDevos/f42414e971d159a42e34255b35369701 to your computer and use it in GitHub Desktop.
sess = tf.InteractiveSession()
model = load_vgg_model(VGG_MODEL)
# Construct content_loss using content_image.
content_image_list = np.reshape(content_image, ((1,) + content_image.shape))
sess.run(model['input'].assign(content_image_list))
content_loss = content_loss_func(sess, model)
# Construct style_loss using style_image.
style_image_list = np.reshape(style_image, ((1,) + style_image.shape))
sess.run(model['input'].assign(style_image_list))
style_loss = style_loss_func(sess, model)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment