t = torch.rand(3,48)
t.mean(dim=0,keepdim=True).shape # torch.Size([1, 48])
t = torch.rand(3,100,100,100)
t.mean(dim=(0,2,3),keepdim=True).shape # torch.Size([1, 100, 1, 1])
t = torch.rand(3,48)
t.mean(dim=0,keepdim=True).shape # torch.Size([1, 48])
t = torch.rand(3,100,100,100)
t.mean(dim=(0,2,3),keepdim=True).shape # torch.Size([1, 100, 1, 1])
本文标题:均值
本文链接:https://www.haomeiwen.com/subject/lparirtx.html
网友评论