Operating environment
Ubuntu 14.04 LTS desktop amd64
GeForce GTX 750 Ti
ASRock Z170M Pro4S [Intel Z170chipset]
TensorFlow v0.11
cuDNN v5.1 for Linux
CUDA v7.5
http://blog.brainpad.co.jp/entry/2016/03/28/170000 Learning.
fully_connected_feed.py The following part I found while reading the code of. The code inside do_eval ().
# And run one epoch of eval.
true_count = 0 # Counts the number of correct predictions.
steps_per_epoch = data_set.num_examples // FLAGS.batch_size
//
I investigated the notation.
It seems that it is an integer division.
http://stackoverflow.com/questions/39968211/what-is-the-meaning-of-in-fully-connected-feed-py
http://stackoverflow.com/questions/183853/in-python-what-is-the-difference-between-and-when-used-for-division
In Python 2.2 or later in the 2.x line, there is no difference for integers unless you perform a from future import division, which causes Python 2.x to adopt the behavior of 3.0
One of the three questions I was worried about in mnist.py was solved.
You should study python more.
As Trejkaz points out in a comment, in Python 3, the // operator means floor division (or integer division): i.e. the result is equivalent to floor(data_set.num_examples / FLAGS.batch_size).
Follow the link from stackoverflow for more details.
Recommended Posts