Solved by thomasjo in post #9 
              
              
                I do not remember the details of Theano’s memory layout, but I am assuming it uses the NCHW format, which means your input dimensions (10, 1, 20, 224) corresponds to 

batch size of 10,
channel depth of 1,
image height of 20 pixels,
image width of 224 pixels.

(The image height of 20 pixels does see…