Strange output of torch.max()
<SCODE>_, max_probs = torch.max(output_var, 2)
print output_var.size()
print max_probs.size()
print torch.max(max_probs)
<ECODE> the outputs: <SCODE>(10L, 26L. 37L)
(10L. 26L, 1L)
37
<ECODE> So size of output_var is (10L, 26L. 37L) and with <SCODE>_, max_probs = torch.max(output_var, 2)
<ECODE> It is a bug of pytorch?
melody-rain
Hi Melody, <SCODE>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
<ECODE> <SCODE>nvidia-smi
<ECODE>
smth