Skip to content
This repository has been archived by the owner on Jan 1, 2021. It is now read-only.

07_convnet_layers.py self.training should use tf.placeholder #142

Open
TonyZZX opened this issue Feb 27, 2019 · 0 comments
Open

07_convnet_layers.py self.training should use tf.placeholder #142

TonyZZX opened this issue Feb 27, 2019 · 0 comments

Comments

@TonyZZX
Copy link

TonyZZX commented Feb 27, 2019

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant