Created
March 16, 2019 22:43
-
-
Save fg91/44fca99448f6ba2a93b9128ba4b4dd73 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
def cos_loss(input, target): | |
return 1 - F.cosine_similarity(input, target).mean() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment