问题
I've implemented a neural network using tensor flow and it appears to be only running on 1/32 data points. I've then tried to following simple example to see if it was me:
https://pythonprogramming.net/introduction-deep-learning-python-tensorflow-keras/
Even when using identical (copied and pasted) code I still get 1/32 of the training data being processed e.g.
Epoch 3/3
1875/1875 [==============================] - 2s 961us/step - loss: 0.0733 - accuracy: 0.9773
instead of the following which the example gives:
Epoch 3/3
60000/60000 [==============================] - 5s 89us/step - loss: 0.0715 - acc: 0.9779
Note: The same issue also occurs whilst calling fit
on the test data
This leaves me to believe I have some global configuration locally which is wrong.
Does anyone know what this configuration is and how to solve it?
回答1:
This is a common misconception, there have been updates to Keras and it now shows batches, not samples, in the progress bar. And this is perfectly consistent because you say 1/32 of the data provided, and 32 is the default batch size in keras.
来源:https://stackoverflow.com/questions/61816649/tensorflow-only-running-on-1-32-of-the-training-data-provided