PyTorch | Basics | Priority Flashcards

1
Q

For a 2x2 outputs object, what will this code do? predictions = torch.nn.functional.softmax(outputs.logits, dim=-1)

pytorch hugging-face

A

Softmax along the columns (here, the -1 dim) to produce probabilities across columns.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly