Your model has a single floating-point output.
Your known class labels are 0 and 1, where 1 indicates that the image is a picture of a bird, and 0 indicates that it is not a bird.
Is there a simple way to implement my own exponential function.
Why do you multiply the labels times 2.
.
The correct value of the loss given by the corrected expression in my next post is 1.
Then: import torch def myExpLoss logits, labels : return 2.
As an aside, you might not want to use an exponential loss.