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

faceswap_gan_model.py - training_updates #174

Open
lutzfinger opened this issue Dec 31, 2020 · 7 comments
Open

faceswap_gan_model.py - training_updates #174

lutzfinger opened this issue Dec 31, 2020 · 7 comments

Comments

@lutzfinger
Copy link

I am running into issues at the line:

model.build_train_functions(loss_weights=loss_weights, **loss_config)

I am getting the following error


---------------------------------------------------------------------------

TypeError                                 Traceback (most recent call last)
<ipython-input-37-685e0523626c> in <module>()
     14 
     15 model.build_pl_model(vggface_model=vggface, before_activ=loss_config["PL_before_activ"])
---> 16 model.build_train_functions(loss_weights=loss_weights, **loss_config)

/content/faceswap-GAN/networks/faceswap_gan_model.py in build_train_functions(self, loss_weights, **loss_config)
    250         # Define training functions
    251         # Adam(...).get_updates(...)
--> 252         training_updates = Adam(lr=self.lrD*loss_config['lr_factor'], beta_1=0.5).get_updates(weightsDA,[],loss_DA)
    253         self.netDA_train = K.function([self.distorted_A, self.real_A],[loss_DA], training_updates)
    254         training_updates = Adam(lr=self.lrG*loss_config['lr_factor'], beta_1=0.5).get_updates(weightsGA,[], loss_GA)

TypeError: get_updates() takes 3 positional arguments but 4 were given

Thanks for any help.

@mirfan899
Copy link

Getting the same error.

@fungtion
Copy link

change Adam(lr=self.lrG*loss_config['lr_factor'], beta_1=0.5).get_updates(weightsGA,[], loss_GA) to Adam(lr=self.lrG*loss_config['lr_factor'], beta_1=0.5).get_updates(loss_GA, weightsGA) may help to solve it.

@varunp2k
Copy link

varunp2k commented May 7, 2021

@fungtion that did not help, any other suggestion?

@ParikhKadam
Copy link

Please mention the tensorflow version you are using and cross check if it matches the one listed in requirements.

@varunp2k
Copy link

varunp2k commented May 8, 2021

@ParikhKadam am using
tf==1.15.5 & `keras==2.1.5

@ParikhKadam
Copy link

@varunp2k Can you try with these?
tensorflow==1.8.0
keras==2.1.5

@varunp2k
Copy link

@ParikhKadam Colab moved to python 3.7, tf1.8 isnt supported by python3.7

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

5 participants