torch.Tensor.sum_to_size¶ Tensor.sum_to_size(*size) → Tensor¶ 将 this 张量 size 转换为 size 的大小, this 必须可以广播到 @4# 张量的大小。 参数: 大小(整数...)- 定义输出张量形状的一组整数。