mediumStudy question · answer published in PyTorch interview questions, so no pointsdeep-learningautogradloss-functions
Using argmax inside a loss
A custom loss uses torch.argmax(logits, dim=1) to pick classes and compares them with labels. The model does not learn. Why?
Discussion 0
Join free to post in the discussion.
Related questions
- Expected starting loss, 10 classesMachine Learning Engineer
- Parameters in nn.Linear(10, 5)Machine Learning Engineer
- Why sigmoid slows deep trainingMachine Learning Engineer
- Range of tanhMachine Learning Engineer
- Cross-entropy loss by handMachine Learning Engineer
- Telling autograd to track a tensorMachine Learning Engineer
- Why wrap inference in no_gradMachine Learning Engineer
- Logging loss without leaking memoryMachine Learning Engineer