>>> import torch
>>> t = torch.ones((2, 3, 4))
>>> t.size()
torch.Size([2, 3, 4])
>>> t.view(-1, 12).size()
torch.Size([2, 12])
Torch中和np.reshape相同功能的函数
猜你喜欢
转载自blog.csdn.net/xijuezhu8128/article/details/86590493
今日推荐
周排行