Coder Social home page Coder Social logo

Comments (5)

ManluZhang avatar ManluZhang commented on June 11, 2024

Did you use the tensorflow 2 to run the script?

from animeganv2.

TongbaoYang avatar TongbaoYang commented on June 11, 2024

Did you use the tensorflow 2 to run the script?

I use 1.15.x to run this train.py script. It's fine when run with defuat configure, but throw the error when specific 'wgan-gp' as the running gan.

from animeganv2.

ManluZhang avatar ManluZhang commented on June 11, 2024

Sorry, I didn't try the 'wgan-gp'. Can't help.

from animeganv2.

TachibanaYoshino avatar TachibanaYoshino commented on June 11, 2024

File "/hy-tmp/AnimeGANv2-master/AnimeGANv2.py", line 125, in gradient_panalty
logit, _= self.discriminator(interpolated, reuse=True, scope=scope)
refer to it to modify.

from animeganv2.

d4rkm0nkey avatar d4rkm0nkey commented on June 11, 2024

I have the same problem with dragan, wgan-lp and wgan-gp. gan, lsgan and hinge are working.
Does anybody know how to fix this?

Traceback (most recent call last):
  File "train.py", line 103, in <module>
    main()
  File "train.py", line 93, in main
    gan.build_model()
  File "/home/.../Documents/masterthesis/repos/AnimeGANv2/AnimeGANv2.py", line 144, in build_model
    GP = self.gradient_panalty(real=self.anime, fake=self.generated)
  File "/home/.../Documents/masterthesis/repos/AnimeGANv2/AnimeGANv2.py", line 114, in gradient_panalty
    logit, _= self.discriminator(interpolated, reuse=True, scope=scope)
  File "/home/.../anaconda3/envs/AnimeGAN/lib/python3.6/site-packages/tensorflow_core/python/framework/ops.py", line 547, in __iter__
    self._disallow_iteration()
  File "/home/.../anaconda3/envs/AnimeGAN/lib/python3.6/site-packages/tensorflow_core/python/framework/ops.py", line 543, in _disallow_iteration
    self._disallow_in_graph_mode("iterating over `tf.Tensor`")
  File "/home/.../anaconda3/envs/AnimeGAN/lib/python3.6/site-packages/tensorflow_core/python/framework/ops.py", line 523, in _disallow_in_graph_mode
    " this function with @tf.function.".format(task))
tensorflow.python.framework.errors_impl.OperatorNotAllowedInGraphError: iterating over `tf.Tensor` is not allowed in Graph execution. Use Eager execution or decorate this function with @tf.function.

from animeganv2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.