view和reshape功能是一樣的,先展平所有元素再按照給定shape排列,但是最終的總數量必須保持不變。 import torch a = torch.rand(28,2,4,28) # ...
確定! 回上一頁