sum

x.dim(dim=0, keepdim=True)

0是按列,1是按行

keepdim是保留行和列这两个维度

posted @ 2020-06-10 10:31  6+0  阅读(127)  评论(0编辑  收藏  举报