torch.sum
https://pytorch.org/docs/stable/generated/torch.sum.html
Returns the sum of all elements in the input tensor.
dimを指定して合計する