google / compare_gan

Compare GAN code.
Apache License 2.0
1.82k stars 319 forks source link

_model_fn() not implemented #17

Closed hmeine closed 5 years ago

hmeine commented 5 years ago

I tried instantiating a simple WGAN_CP (based on your task 3), but got this error:

NotImplementedError: _model_fn() must be implemented in subclasses of AbstractGAN.

Looking at the code, there's only one file (compare_gan/src/gans/gans_with_penalty.py) which implements this function. I wonder how this worked for you – is this related to TF version or so?

I uploaded a gist with a testcase: https://gist.github.com/hmeine/d7ef0c38790dc885f3f73e621e14ff31 There's a button opening the notebook on colab, where you can see that the dependency versions are:

tensor2tensor                      1.11.0               
tensorflow                         1.13.0rc1            
Marvin182 commented 5 years ago

Please use train() instead of train_with_estimator(). The later is not supported for all GAN classes. We will fix this with a release soon.

On Mon, Feb 18, 2019 at 11:26 PM Hans Meine notifications@github.com wrote:

I tried instantiating a simple WGAN_CP (based on your task 3), but got this error:

NotImplementedError: _model_fn() must be implemented in subclasses of AbstractGAN.

Looking at the code, there's only one file ( compare_gan/src/gans/gans_with_penalty.py) which implements this function. I wonder how this worked for you – is this related to TF version or so?

I uploaded a gist with a testcase: https://gist.github.com/hmeine/d7ef0c38790dc885f3f73e621e14ff31 There's a button opening the notebook on colab, where you can see that the dependency versions are:

tensor2tensor 1.11.0

tensorflow 1.13.0rc1

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/google/compare_gan/issues/17, or mute the thread https://github.com/notifications/unsubscribe-auth/ABGtf0fl-I0zgviIbuFao9t_XQS0st1dks5vOyiegaJpZM4bBtvp .

hmeine commented 5 years ago

Thanks, that helped indeed!

Just to give you some feedback: I like your repository a lot because it comprises so many different models and model configurations, but the purpose you developed it for shines through in the code structure and API – it is not very easy to use the code without setting up a full experiment the way you indended to use it.

Marvin182 commented 5 years ago

Thank you for the feedback. I are working on a new release that focuses more on single runs.

Hans Meine notifications@github.com schrieb am Do., 21. Feb. 2019, 00:04:

Thanks, that helped indeed!

Just to give you some feedback: I like your repository a lot because it comprises so many different models and model configurations, but the purpose you developed it for shines through in the code structure and API – it is not very easy to use the code without setting up a full experiment the way you indended to use it.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/google/compare_gan/issues/17#issuecomment-465791460, or mute the thread https://github.com/notifications/unsubscribe-auth/ABGtfwVQ8s4_3WkPeWs4xtIFiiIoVG-uks5vPdR3gaJpZM4bBtvp .