Replies: 1 comment
-
Nvm I just saw that someone else asked the same thing rexently. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When we wrote the train and test step functions to calculate the accuracy we passed the raw logits only through
torch.argmax()
and not throughtorch.softmax()
. This code is a part from thetrain_step
function from Daniel's notebook and you can see that we pass as an argument to the accuracy function, they_pred.argmax(dim=1)
, wherey_pred
is actually they_logits
.Later at 18:47:30 when we wrote a function to make predictions with the already trained CNN model we wrote the following code:
Here you can see that we passed the logits first from
torch.softmax()
and then later to make the predictions we passed it also throughtorch.argmax()
Why is this? Why in the first case we didn't use
torch.softmax()
but then we did?Btw I made predictions by passing the raw outcome of the model only through
torch.argmax()
and it worked very well.Beta Was this translation helpful? Give feedback.
All reactions