TensorFlow 仅在提供的训练数据的 1/32 上运行 [英] TensorFlow Only running on 1/32 of the Training data provided
问题描述
我已经使用张量流实现了一个神经网络,它似乎只在 1/32 的数据点上运行.然后我试着按照简单的例子来看看是不是我:
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/
即使使用相同(复制和粘贴)的代码,我仍然得到 1/32 的正在处理的训练数据,例如
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
注意:在测试数据上调用 fit
时也会出现同样的问题
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?
推荐答案
这是一个常见的误解,Keras 已经更新,现在在进度条中显示批次,而不是样本.这是完全一致的,因为您说提供的数据的 1/32,而 32 是 keras 中的默认批大小.
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.
这篇关于TensorFlow 仅在提供的训练数据的 1/32 上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!