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.