Part of my codes:
reshape_out = Reshape((3, 21, 1), input_shape=(21*3,), name='reshape_to_3_21')(output3d)
drop_out = Lambda(lambda x:x[0:2, :, :], output_shape=(2, 21, 1), name='projection')(reshape_out)
flatten_out = Flatten()(drop_out)
I got the following error:
InvalidArgumentError: Matrix size-incompatible: In[0]: [2,63], In[1]: [42,1024].
But if
drop_out = Lambda(lambda x:x[0:2, :, :], output_shape=(2, 21, 1), name='projection')(reshape_out)
is removed, everything is OK. Why?