shaoanlu / faceswap-GAN

A denoising autoencoder + adversarial losses and attention mechanisms for face swapping.
3.38k stars 844 forks source link

Syntax Error on declare global variables #120

Open chilian1996 opened 5 years ago

chilian1996 commented 5 years ago

When I run the training file, it shows as below:

File "FaceSwap_GAN_v2.2_train_test.py", line 294 global train_batchA, train_batchB ^ SyntaxError: name 'train_batchA' is used prior to global declaration

zikuicai commented 5 years ago

just delete the global statement if it's outside a function. Only inside-function global statements have effect.

dpk01singh commented 4 years ago

@zikuicai thank you your solution worked