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

There is still instance normalization in generator #8

Open
tr3e opened this issue Nov 1, 2018 · 3 comments
Open

There is still instance normalization in generator #8

tr3e opened this issue Nov 1, 2018 · 3 comments

Comments

@tr3e
Copy link

tr3e commented Nov 1, 2018

There is still instance normalization in generator though the argument tf.constant(False), is it a bug?

@tr3e
Copy link
Author

tr3e commented Nov 1, 2018

I printed the trainable variables and found there is instance_norm in block 'c1', 'c2' and 'c3' of generator with mask.

@AlamiMejjati
Copy link
Owner

This is normal.
Instance norm is in that case performed using tf.cond, which is the TensorFlow equivalent of an If statement.
When using tf.cond Tensorflow builds the graph for the two outcomes of tf.cond, the first outcome being the one corresponding to the True statement and the second one corresponding to the False statement. Tensorflow is obliged to do that as it is graph based.
With that in mind it is normal to find the instance norm variables in tf.trainable_variables, however at computation time, the data flow does not go through the instance norm branch.

@tr3e
Copy link
Author

tr3e commented Nov 9, 2018

This is normal.
Instance norm is in that case performed using tf.cond, which is the TensorFlow equivalent of an If statement.
When using tf.cond Tensorflow builds the graph for the two outcomes of tf.cond, the first outcome being the one corresponding to the True statement and the second one corresponding to the False statement. Tensorflow is obliged to do that as it is graph based.
With that in mind it is normal to find the instance norm variables in tf.trainable_variables, however at computation time, the data flow does not go through the instance norm branch.

Understood.

This is normal.
Instance norm is in that case performed using tf.cond, which is the TensorFlow equivalent of an If statement.
When using tf.cond Tensorflow builds the graph for the two outcomes of tf.cond, the first outcome being the one corresponding to the True statement and the second one corresponding to the False statement. Tensorflow is obliged to do that as it is graph based.
With that in mind it is normal to find the instance norm variables in tf.trainable_variables, however at computation time, the data flow does not go through the instance norm branch.

Thank you.

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