问题 Have tensor like : x.shape = [3, 2, 2] . import torch x = torch.tensor([ [[-0.3000, -0.2926],[-0.2705, -0.2632]], [[-0.1821, -0.1747],[-0.1526, -0.1453]], [[-0.0642, -0.0568],[-0.0347, -0.0274]] ]) I need to take .max() over the 2nd and 3rd dimensions. I expect some like this [-0.2632, -0.1453, -0.0274] as output. I tried to use: x.max(dim=(1,2)) , but this causes an error. 回答1: As of today, there is no way to do .min() or .max() over multiple dimensions in PyTorch. There is an open issue