07_convnet_layers.py self.training should use tf.placeholder
TonyZZX opened this issue · 0 comments
TonyZZX commented
If you use a Python bool, the value of training won't change because you already build the logits before the session and you can't change the graph during the session.
The correct way should use tf.placeholder like this:
self.training = tf.placeholder(tf.bool, name='is_train')
And set sess.run(init, feed_dict={self.is_training: True})
when trainingand sess.run(init, feed_dict={self.is_training: False})
when evalating