T.max (dim = -1)[0].max (dim = -1)[0] should work, or you can
use the equivalent torch.max() version, if you prefer. (This could also
be written T.max (dim = 2)[0].max (dim = 1)[0].)
(If you want to be courageous, you could try the unstable, nightly build,
e.g., version “1.8.0.dev20201021,” and run T.amax (dim = (1, 2)).)
dim = 0 doesn’t mean “keep dim 0.” It means take the max() over
dim 0. So it builds tensor of shape [10, 10], each element of which
is the max() of 100 values, namely the max() of the corresponding
elements of the 100 shape-[10, 10] slices of your original tensor.