評價此頁

torch.Tensor.sum_to_size#

Tensor.sum_to_size(*size) Tensor#

this 張量求和到 sizesize 必須可廣播到 this 張量的尺寸。

引數

size (int...) – 定義輸出張量形狀的整數序列。