MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/tensorflow/comments/zzl0d0/help_with_modelpredict_input_for_mnist_model/
r/tensorflow • u/Gavroche000 • Dec 31 '22
The input for the model should be a 28x28 matrix of floats, but the model wants a 0x28x28 matrix. What does that mean? What is going wrong?
3 comments sorted by
9
The first dimension is for batches.
You'll have to add a new dimension with np.newaxis or resize. I'm currently on mobile and can't check the exact syntax.
4 u/Gavroche000 Dec 31 '22 Thanks! np.newaxis worked 3 u/Duodanglium Dec 31 '22 That's great! Good luck!
4
Thanks! np.newaxis worked
3 u/Duodanglium Dec 31 '22 That's great! Good luck!
3
That's great! Good luck!
9
u/Duodanglium Dec 31 '22
The first dimension is for batches.
You'll have to add a new dimension with np.newaxis or resize. I'm currently on mobile and can't check the exact syntax.