首先torch.set_pointoptions()如下:
torch.set_printoptions(precision=None, threshold=None, edgeitems=None, linewidth=None, profile=None)
precision是每一个元素的输出精度,默认是八位;
threshold是输出时的阈值,当tensor中元素的个数大于该值时,进行缩略输出,默认时1000;
edgeitems是输出的维度,默认是3;
linewidth字面意思,每一行输出的长度;
profile=None,修正默认设置
原文链接:https://blog.csdn.net/qq_30122359/article/details/102976274