pytorch中tensor.expand()和tensor.expand_as()函数解读
tensor.expend()函数>>> import torch>>> a=torch.tensor([[2],[3],[4]])>>> print(a.size())torch.Size([3, 1])>>> a.expand(3,2)tensor([[2, 2], [3, 3], ...