Thanks Arul - that makes a lot of sense.
This is my output now:
>>> maxval = torch.max(a,0)
>>> maxval[0].size()
torch.Size([3, 128, 128, 128])
>>> maxval[0][0,0,0,:5]
tensor([0.9971, 0.9611, 0.9765, 0.9123, 0.9630])
>>> maxval[1][0,0,0,:5]
tensor([14,  0,  2, 18, 17])

So the second item in the tuple is list of indices and they are of the same size as that of the first item in maxval tuple.
My torch version is  ‘1.1.0a0+7c2290e’