jamesmf / mnistCRNN

Simple TimeDistributed() wrapper Demo in Keras; sums images of MNIST digits
61 stars 24 forks source link

Mismatch in the shape of training and testing data #8

Closed Sroy20 closed 7 years ago

Sroy20 commented 7 years ago

Hi again,

In the script addMNISTrnn.py, the way the training and testing matrices are initialized are:

X_train = np.zeros((examplesPer,maxToAdd,size,size,1)) X_test = np.zeros((examplesPer,maxToAdd,1,size,size))

So, the position of the depth channel is different for both of them. This throws an error when during testing.

In my case, I changed the shape of X_test and the bit of code (for loop) following that and it works seamlessly.

jamesmf commented 7 years ago

Thanks for pointing out. I uncommented the 'test' section and fixed the dim ordering there as well.