Theano ValueError:new_order[2]为1,但输入只有1个轴
对于以下代码:Theano ValueError:new_order[2]为1,但输入只有1个轴,theano,Theano,对于以下代码: imgs = theano.shared(numpy.asarray(numpy.random.uniform((batch_size,c,n1,n2)),dtype=theano.config.floatX)) imgs = imgs.dimshuffle((0,'x', 1, 2, 3)) 我得到以下错误: ValueError: new_order[2] is 1, but the input only has 1 axes. 我看不出问题到底出在哪里。有什么想法吗?你
imgs = theano.shared(numpy.asarray(numpy.random.uniform((batch_size,c,n1,n2)),dtype=theano.config.floatX))
imgs = imgs.dimshuffle((0,'x', 1, 2, 3))
我得到以下错误:
ValueError: new_order[2] is 1, but the input only has 1 axes.
我看不出问题到底出在哪里。有什么想法吗?你忘了告诉什么参数是
(批量大小,c,n1,n2)
您忘记告诉什么参数是
(批量大小,c,n1,n2)
imgs = theano.shared(numpy.asarray(numpy.random.uniform(size=(batch_size,c,n1,n2)),dtype=theano.config.floatX))
imgs = imgs.dimshuffle((0,'x', 1, 2, 3))