faceswap_gan_model.py - training_updates
lutzfinger opened this issue · 7 comments
lutzfinger commented
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 commented
Getting the same error.
fungtion commented
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.
ParikhKadam commented
Please mention the tensorflow version you are using and cross check if it matches the one listed in requirements.
varunp2k commented
@ParikhKadam am using
tf==1.15.5
& `keras==2.1.5
ParikhKadam commented
@varunp2k Can you try with these?
tensorflow==1.8.0
keras==2.1.5
varunp2k commented
@ParikhKadam Colab moved to python 3.7, tf1.8 isnt supported by python3.7