我需要在控制台中打印一个大张量([32,32,3]),并且我只会得到如下输出:
[[[245 245 245]
[245 245 245]
[245 245 245]
...,
[245 245 245]
[245 245 245]
[245 245 245]]
[[245 245 245]
[245 245 245]
[245 245 245]
...,
[245 245 245]
[245 245 245]
[245 245 245]]
[[245 245 245]
[245 245 245]
[245 245 245]
...,
[245 245 245]
[245 245 245]
[245 245 245]]
...,
[[245 245 245]
[245 245 245]
[245 245 245]
...,
[245 245 245]
[245 245 245]
[245 245 245]]
[[245 245 245]
[245 245 245]
[245 245 245]
...,
[245 245 245]
[245 245 245]
[245 245 245]]
[[245 245 245]
[245 245 245]
[245 245 245]
...,
[245 245 245]
[245 245 245]
[245 245 245]]]
Run Code Online (Sandbox Code Playgroud)
如何获取张量流以打印出整个张量,而不是用省略号将其截断?
x = y = z = np.arange(0.0,5.0,1.0)
np.savetxt('test.out', x, delimiter=',') # X is an array
np.savetxt('test.out', (x,y,z)) # x,y,z equal sized 1D arrays
np.savetxt('test.out', x, fmt='%1.4e') # use exponential notation
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3276 次 |
| 最近记录: |