what about argmax from the tensor itself like:
import torch
x = torch.randn(3)
x.argmax(-1)
meta:
- where does one find the docs for this? googling takes you to the torch.argmax
function and not the one for tensors…ans: seems this is where it is: https://pytorch.org/docs/stable/tensors.html
probably useful: