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

Can you make this work with Tensorflow 2.4.1 and above with tf.distribute.MirroredStrategy() #17

Open
thusinh1969 opened this issue Jul 22, 2021 · 2 comments

Comments

@thusinh1969
Copy link

I almost give up that it keep posing error after error running with tf.distribute.MirroredStrategy().

ValueError: in user code:

<ipython-input-43-fa18d8117b40>:554 train_step  *
    gradients_of_generator = gen_tape.gradient(gen_loss, self.GAN.GM.trainable_variables)
C:\Users\ThuSi\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\eager\backprop.py:1064 gradient  **
    flat_sources = [_handle_or_self(x) for x in flat_sources]
C:\Users\ThuSi\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\eager\backprop.py:1064 <listcomp>
    flat_sources = [_handle_or_self(x) for x in flat_sources]
C:\Users\ThuSi\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\eager\backprop.py:729 _handle_or_self
    return x.handle
C:\Users\ThuSi\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\distribute\values.py:639 handle
    raise ValueError("`handle` is not available outside the replica context"

ValueError: `handle` is not available outside the replica context or a `tf.distribute.Strategy.update()` call.

Can you make this work with Tensorflow 2.4.1 and above with tf.distribute.MirroredStrategy()

Thanks,
Steve

@manicman1999
Copy link
Owner

Hi! I'm currently in the middle of updating this code to work with multi-GPU machines and adaptive discriminator augmentation; keep an eye out for that!

@robbelouwet
Copy link

Hi, where are you on this? Do you have some idea on when the MirroredStrategy() will work?

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

3 participants