Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vb.net/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Theano ValueError:new_order[2]为1,但输入只有1个轴_Theano - Fatal编程技术网

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))