Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UPDATE_OPS #18

Open
Theophile88 opened this issue Dec 30, 2017 · 1 comment
Open

UPDATE_OPS #18

Theophile88 opened this issue Dec 30, 2017 · 1 comment

Comments

@Theophile88
Copy link

The code isn't missing something like:

update_ops = tf.get_collection(tf.GraphKeys.UPDATE_OPS)
with tf.control_dependencies(update_ops):
train_op = tf.train.AdamOptimizer(learning_rate = 1e-5).minimize(total_loss,global_step = global_step)

to ensure correct statistics during BN at test time?

@Joker316701882
Copy link
Owner

@Theophile88
Yeah that's right!
Here the training_batch size is set as 1, so this can be considered as using local statistics instead of moving statistics. At testing time, BN is still in training mode, so local statistics are also applied.
I tried using moving statistics of BN with batch size >1, there is no big difference according to experiment.
And as other issues mentioned, one main problem for not good performance is that I should use 'original size image inference' at test time instead of resized image.

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

No branches or pull requests

2 participants