Hi Melody,
I’ve tried to reproduce this issue, but I am not able to.
Here is the snippet of code I am using:
import torch
from torch.autograd import Variable

output_var = Variable(torch.randn(10, 26, 37).cuda())

_, max_probs = torch.max(output_var, 2)
print output_var.size()
print max_probs.size()

for i in range(1000):
    assert torch.max(max_probs).data[0] == 36

Does this snippet fail on your computer?
If so, what is:
print(pytorch.__version__)
and also what is the output of:
nvidia-smi