TensorFlow仅在提供的训练数据的1/32上运行 [英] TensorFlow Only running on 1/32 of the Training data provided

查看:79
本文介绍了TensorFlow仅在提供的训练数据的1/32上运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用张量流实现了一个神经网络,它似乎只在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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆