无论dim是个tuple还是一个int型整数,都是要让对应的维度消失。举例:a = torch.tensor([ [ [ [1,2,3], [4,5,6] ] ]])print(a)a.shape ...
確定! 回上一頁