【PyTorch】torch.mean(), dim=0, dim=1

对于torch.mean(s,dim=0),表示跨行求平均。

同理,对于dim=1为第一个维度,代表列。
对于torch.sum(s,dim=1),表示跨列求平均。

猜你喜欢

转载自blog.csdn.net/qq_30129009/article/details/126785909