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

Results not reproducible #4

Open
fjulian opened this issue Dec 9, 2021 · 2 comments
Open

Results not reproducible #4

fjulian opened this issue Dec 9, 2021 · 2 comments

Comments

@fjulian
Copy link

fjulian commented Dec 9, 2021

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)
@echocxl
Copy link

echocxl commented Jan 15, 2022

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!

@zhmou
Copy link

zhmou commented Apr 11, 2022

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)

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

3 participants