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