giannisdaras / ylg

[CVPR 2020] Official Implementation: "Your Local GAN: Designing Two Dimensional Local Attention Mechanisms for Generative Models".
GNU General Public License v3.0
136 stars 18 forks source link

ValueError: There are unused update ops #3

Closed RenYurui closed 4 years ago

RenYurui commented 4 years ago

Hi! Thanks for your amazing repo! I want to train your model. I have cloned your repo ("train" branch). But I got this error:

raise ValueError('There are unused update ops: %s' % unused_ops)
ValueError: There are unused update ops: {<tf.Operation 'replica_3/Generator/generator/g_block1/cbn_0/ema_update_ops' type=NoOp>,
<tf.Operation 'replica_2/Generator/generator/g_block2/cbn_1/ema_update_ops' type=NoOp>, 
<tf.Operation 'replica_1/Generator/generator/g_block4/cbn_1/ema_update_ops' type=NoOp>, 
<tf.Operation 'replica_2/Generator/generator/g_block3/cbn_0/ema_update_ops' type=NoOp>, 
<tf.Operation 'replica_2/Generator/generator/g_bn/ema_update_ops' type=NoOp>, 
<tf.Operation 'replica_3/Generator/generator/g_block1/cbn_1/ema_update_ops' type=NoOp>, 
<tf.Operation 'replica_1/Generator/generator/g_block5/cbn_0/ema_update_ops' type=NoOp>, 
<tf.Operation 'replica_2/Generator/generator/g_block3/cbn_1/ema_update_ops' type=NoOp>, 
<tf.Operation 'replica_1/Generator/generator/g_block5/cbn_1/ema_update_ops' type=NoOp>, 
......

Do you have any ideas about this?

My environments are: CUDA 10.0 cudnn 7.4 tensorflow-gpu 2.0.1 tensorflow-gan 2.0.0

Thanks!

RenYurui commented 4 years ago

I follow the issue here to turn the checking flag to False. And the bug disappears. However, I do not know whether this operation is correct. Could you please give me some advice?

giannisdaras commented 4 years ago

Hi! Thanks for bringing this to my attention. So, you are trying to train this on GPU(s) environment right? I have only run my experiments on TPUs so far.

RenYurui commented 4 years ago

Thanks for your reply! I will close this issue cause the code seems correct when I turn the checking flag to False. Updates will be provided if I find something new.