Created
January 8, 2018 11:39
-
-
Save ArnoutDevos/6bcc3e5f5baff5703aee969150c7acfc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CONTENT_LAYER = 'conv4_2' | |
def content_loss_func(sess, model): | |
def _content_loss(current_feat, content_feat): | |
loss = 0.5*tf.reduce_sum(tf.square(current_feat - content_feat)) | |
return loss | |
return _content_loss(sess.run(model[CONTENT_LAYER]), model[CONTENT_LAYER]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment