python - Value Error: Dimension Mismatch .., in Theano -
i followed convolutional neural network tutorial , try re-write code from: http://deeplearning.net/tutorial/code/convolutional_mlp.py
and try change code line 108, from:
self.output = t.tanh(pooled_out + self.b.dimshuffle('x', 0, 'x', 'x'))
to
self.output = t.tanh(conv_out + self.b.dimshuffle('x', 0, 'x', 'x'))
and got error:
valueerror: dimension mismatch in args gemm (500,20000)x(800,500)->(500,500) apply node caused error: gpudot22(gpuelemwise{tanh,no_inplace}.0, w) toposort index: 40 inputs types: [cudandarraytype(float32, matrix), cudandarraytype(float32, matrix)] inputs shapes: [(500, 20000), (800, 500)] inputs strides: [(20000, 1), (500, 1)] inputs values: ['not shown', 'not shown'] outputs clients: [[gpuelemwise{composite{tanh((i0 + i1))}}[(0, 0)](gpudot22.0, gpudimshuffle{x,0}.0)]]
i don't know why happen, because think pooled_out
, conv_out
have same shape in second dimension
can me explain why happen?
the problem not inside lenetconvpoollayer
it's in following layer expecting output lenetconvpoollayer
1 size getting else.
to skip pooling, you'll need adjust every layer follows lenetconvpoollayer
expect input appropriately larger size.
Comments
Post a Comment