pytorch get argmax of tensor code example Example: pytorch tensor argmax values, indices = tensor.max(0) values, indices = torch.max(tensor, 0)