It looks like you are dealing with 25000 grayscale images with a spatial dimension of 10x10.
If that’s correct, you would have to pass your data as [batch_size, channel, height, width] into your model.
Your first conv layer however, uses 10 input channel instead of 1 (for a grayscale image).
So this might be a reason for the difference.
Could you print the shape of a batch and explain your data shapes?