MiaoyunZhao / GANmemory_LifelongLearning

50 stars 5 forks source link

Some functions used are missing #3

Closed qinenergy closed 3 years ago

qinenergy commented 3 years ago

Hi there, Thanks for the code and paper! I tried to run the code, but ran into the following issue:

It would be really helpful if you could answer the above questions.

Thanks in advance.

MiaoyunZhao commented 3 years ago

Hi there, Thanks for the code and paper! I tried to run the code, but ran into the following issue:

  • Trainer does not have argument D_fix_layer in gan_training/train.py (This stops me from running any experiments): Traceback (most recent call last): File "GANMemory_Flowers.py", line 224, in D_fix_layer=config['discriminator']['layers'] TypeError: init() got an unexpected keyword argument 'D_fix_layer'
  • Missing calculate_fid_given_real_ms function used by eval.py

It would be really helpful if you could answer the above questions.

Thanks in advance.

Hi, thanks for your interests. (1) Please remove the line "D_fix_layer=config['discriminator']['layers']" from File "GANMemory_Flowers.py"; (2) Please remove the codes relate to "calculate_fid_given_real_ms" from file "eval.py". This function is not applicable. Also, I have updated these issues in the code. You can refer to it. Please let me know if you can run it now.

qinenergy commented 3 years ago

Hi, Thanks a lot for the reply. The code can be run now.

I ran GANMemory_Flowers.py for 60000 iterations, and tried to compare it with the FID results in figure 1b: 10000: 24.3 20000: 20.18 30000: 19.63 40000: 18.54 50000: 19.17 60000: 20.32 The results seem quite different from the reported <16 FID score after 60k iterations in figure 1b. I guess I missed something. May I ask is there anything else I need to do to get similar results from 1b?

I used python=3.7 and pytorch=1.2.0 as suggested in the code.

Thanks in advance.

MiaoyunZhao commented 3 years ago

Hi, Thanks a lot for the reply. The code can be run now.

I ran GANMemory_Flowers.py for 60000 iterations, and tried to compare it with the FID results in figure 1b: 10000: 24.3 20000: 20.18 30000: 19.63 40000: 18.54 50000: 19.17 60000: 20.32 The results seem quite different from the reported <16 FID score after 60k iterations in figure 1b. I guess I missed something. May I ask is there anything else I need to do to get similar results from 1b?

I used python=3.7 and pytorch=1.2.0 as suggested in the code.

Thanks in advance.

You can try it with the line "discriminator = load_model_norm(discriminator, is_G=False)" commented in file " GANMemory_Flowers.py".

qinenergy commented 3 years ago

Hi, I tried the updated version of the code and get the following FID results: 5000: 38.79 10000: 26.74 15000: 23.33 20000: 22.38 I didn' run it further as it seems to be worse than my initial run before the modification.

MiaoyunZhao commented 3 years ago

Hi, I tried the updated version of the code and get the following FID results: 5000: 38.79 10000: 26.74 15000: 23.33 20000: 22.38 I didn' run it further as it seems to be worse than my initial run before the modification.

Hi, I have settled and updated the issues in computing FID. The file "GANMemory_Flowers.py" and "resnet4_AdaFM_bias.py" are updated. Please compare and update.

qinenergy commented 3 years ago

The results I got using this version of code is: 10k 23.56 20k 20.68 30k 18.53 40k 16.91 50k 16.61 60k 15.76

May I ask what the FID score is for flowers, cats and Cathedrals in the Figure1b? I just realized it is log-scale and a bit hard to read.

Thanks a lot for updating the code.

MiaoyunZhao commented 3 years ago

The results I got using this version of code is: 10k 23.56 20k 20.68 30k 18.53 40k 16.91 50k 16.61 60k 15.76

May I ask what the FID score is for flowers, cats and Cathedrals in the Figure1b? I just realized it is log-scale and a bit hard to read.

Thanks a lot for updating the code.

Hi, the results now are very close to those shown Figure 1(b). The FID scores of Fig.1(b) are made available now, please refer to the Table of Readme file. Hope it is helpful.

qinenergy commented 3 years ago

Thanks a lot