Created
November 28, 2021 05:48
-
-
Save danielcwq/f8f9008af8455c4a5693d63edbbc8fde to your computer and use it in GitHub Desktop.
Creating the mnist_loss function
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 mnist_loss(predictions, targets): | |
return torch.where(targets==1, 1-predictions, predictions).mean() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment