th> x=torch.rand(3,4)
th> x
0.9382 0.0923 0.7964 0.5702
0.7325 0.1997 0.7330 0.3008
0.4828 0.4719 0.4796 0.2431
[torch.DoubleTensor of size 3x4]
th> y=x:select(2,2)
th> value,idx=torch.max(y,1)
th> value
0.4719
[torch.DoubleTensor of size 1]
th> idx
1
[torch.LongTensor of size 1]
If the tensor is not contiguous,the "max" operation cannot get a right result for "index",the same problem as "min" operation.
The problem can be found in the torch7 distribution version 2f95bf3. The old version may not have this problem.
Thanks for fixing in time. Install the new version has solved this problem. The problem happened in the torch distribution version 2f95bf3 and corresponding torch7 version ac3751c.
If the tensor is not contiguous,the "max" operation cannot get a right result for "index",the same problem as "min" operation. The problem can be found in the torch7 distribution version 2f95bf3. The old version may not have this problem.