Skip to content

Instantly share code, notes, and snippets.

@danielhavir
Created February 3, 2019 23:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielhavir/6747871790e5cfec98149e765bd9cdfb to your computer and use it in GitHub Desktop.
Save danielhavir/6747871790e5cfec98149e765bd9cdfb to your computer and use it in GitHub Desktop.
def content_loss(content_features, generated_features, j):
loss_content = F.mse_loss(generated_features[j], content_features[j])
return loss_content
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment