what is the mean of (most likely classes )?

top_p, top_class = ps.topk(1, dim=1)

# Look at the most likely classes for the first 10 examples

print(top_class[:10,:])

what is the mean of (most likely classes )?

top_p, top_class = ps.topk(1, dim=1)

print(top_class[:10,:])

I assume `ps`

gives you the class probabilities (or logits), so `topk`

will give you the highest class probabilities (logits) with the class indices for the current samples.

Since you are using `.topk(k=1, dim=1)`

, you’ll only get the single most likely prediction.

1 Like