torch.Tensor.sum_to_size¶ Tensor.sum_to_size(*size) → 张量¶ 将 this 张量求和到 size。 size 必须可广播到 this 张量的大小。 Parameters size (int...) – 定义输出张量形状的整数序列。