Solved by ptrblck in post #4 
              
              
                Thanks for the info. 
The batch dimensions are indeed different for your data and target as the error message suggests. 
I think your reshape in this line of code seems to create more samples for the data: 
X = np.array([i[0] for i in train]).reshape(-1, 1, input_height, input_width) /255

The diffe…