当前位置:网站首页>Solution of ellipsis when pytorch outputs tensor (output tensor completely)

Solution of ellipsis when pytorch outputs tensor (output tensor completely)

2022-07-05 10:17:00 friedrichor

Problem description

Because sometimes tensor The amount of data is large ,print Output tensor The data in the middle part will be replaced by ellipsis ( Here's the picture ), So that you can't see all the parameter sizes .
 Insert picture description here

Solution

Add the following content at the beginning of the file

import torch
torch.set_printoptions(threshold=np.inf)
原网站

版权声明
本文为[friedrichor]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/186/202207050948361103.html