【发布时间】:2016-07-18 15:48:18
【问题描述】:
为什么我不能通过我下面写的代码来评估重构后的张量变量?
from theano import shared
from theano import tensor as T
import numpy
x = T.matrix('x') # the input data
# input = (nImages, nChannel(nFeatureMaps), nDim1, nDim2, nDim3)
layer1_input = T.reshape(x, xTrain.shape, ndim=5)
layer1_input.eval({x:xTrain})
由于我已经对张量变量 x 进行了整形,并将一个相同维度的 numpy 数组传递给它,所以它只是报告,
TypeError:('带有名称的theano函数的输入参数错误 ":17" 在索引 0(从 0 开始)', '错误 维度数:预期为 2,得到 5 个形状(2592、1、51、61, 23).')
【问题讨论】:
标签: python numpy theano deep-learning