【发布时间】:2016-05-13 12:48:40
【问题描述】:
我有一个大小为 64x64x3x3 的 Torch Cuda 张量,我想将给定层的权重可视化如下:
local layer = model:get(3)
local weights = layer.weight
local imgDisplay = image.toDisplayTensor{input=weights, padding=2, scaleeach=80}
这会产生错误:
'packed must be a HxW or KxHxW or Kx3xHxW tensor, or a list of tensors
我应该如何调整张量的大小以使用 toDisplayTensor?谢谢。
【问题讨论】:
-
谢谢,我需要知道如何改变张量的尺寸:最后,我使用了 [Tensor] transpose(dim1, dim2)。
标签: image image-processing machine-learning neural-network torch