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.