torch.Tensor.sum_to_size¶ Tensor.sum_to_size(*size) → Tensor¶ 將 this 張量加總至 size。size 必須能廣播至 this 張量的大小。 參數 size (int...) – 定義輸出張量形狀的整數序列。