TensorFlow Only running on 1/32 of the Training data provided

久未见 提交于 2020-12-17 09:36:48

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!