wgan-gp icon indicating copy to clipboard operation
wgan-gp copied to clipboard

Results not reproducible

Open fjulian opened this issue 2 years ago • 2 comments

Thanks for sharing this repo.

Running the code (main.py, 200 epochs, parameters as mentioned in readme, only fixing the the issue mentioned in #1), I couldn't reproduce the results shown in https://github.com/EmilienDupont/wgan-gp/blob/master/gifs/mnist_200_epochs.gif. Instead, the generated samples look as follows:

training_200_epochs

Any hints on what would need to be changed to make the training successful?

One step towards reproducibility would be to fix random seeds in the beginning of main.py, e.g. with the following code:

import random
import numpy as np
import torch
random_seed = 42
random.seed(random_seed)
np.random.seed(random_seed)
torch.manual_seed(random_seed)
torch.cuda.manual_seed_all(random_seed)

fjulian avatar Dec 09 '21 10:12 fjulian

Hello ,I met the same problem as you. And I find it that this gif what my model generated 6.60Mb, But in this code example gif folder,it is 8.22 Mb. What make this difference? I hope author to anser this question,thank you very much!

echocxl avatar Jan 15 '22 12:01 echocxl

Hello ,I met the same problem as you. And I find it that this gif what my model generated 6.60Mb, But in this code example gif folder,it is 8.22 Mb. What make this difference? I hope author to anser this question,thank you very much!

guess it's the learning rate and trainning epoch causing that problem, i changed it to 5x larger: lr = 5e-4, and the performance will be better: after 50 epochs trainning: Epoch50

(you can train it longer and check your result)

zhmou avatar Apr 11 '22 09:04 zhmou