Well, about the sum function. In document ,it says that torch.sum function can sum in different axis, such as
a=torch.randn(4,4)
b=torch.sum(a,dim=1)

then we get a tensor b with dimension 4. But in the __init__.py file of torch.sum, the definition is def sum(input): which losses some arguments that don’t appear in the prompt message.
It doesn’t affect the use at all and may be a very small problem.