Skip to content
Discussion options

You must be logged in to vote
y_pred = torch.softmax(y_logits,dim=1).argmax(dim=1) 

Softmax purpose is to convert all raw logits into probabilities within the range [0, 1] and
argmax purpose is to select the index of the highest probability.

Therefore, obtaining the index of the highest probability within the range of [0, 1] provides us with the class label of the particular object we are trying to predict.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mosaabthemuslim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants