Pytorch:输出整个tensor的方法 torch.set_printoptions(profile="full") print(x) # prints the whole tensor torch.set_printoptions(profile="default") # reset print(x) # prints the truncated tensor 将这个代码放在import torch之后就可以了,full代表输出所有,deflaut是默认输出部分