Thanks, but I was referring to the documentation being misaligned with the behavior.
The docs say that torch.squeeze() “Returns a tensor with all the dimensions of input of size 1 removed… As an exception to the above, a 1-dimensional tensor of size 1 will not have its dimensions changed," but I show that I create a 1-dim tensor and squeeze() does change the tensor’s shape.
What am I missing?
Note that I intentionally created a 1-dim tensor with 1 element in it:
a = torch.tensor([512])

And not a 0-dim tensor:
a = torch.tensor(512)