AlamiMejjati / Unsupervised-Attention-guided-Image-to-Image-Translation

Unsupervised Attention-Guided Image to Image Translation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

There is still instance normalization in generator

tr3e opened this issue · comments

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

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

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.

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.