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

Problem with MNIST DCGANs tutorial #391

Open
LucasMSpereira opened this issue Feb 1, 2022 · 5 comments
Open

Problem with MNIST DCGANs tutorial #391

LucasMSpereira opened this issue Feb 1, 2022 · 5 comments

Comments

@LucasMSpereira
Copy link

Trying to get into Flux.jl, I found this tutorial about using DCGANs with MNIST. After going through the tutorial and transferring all the code to a file, the generator didn't seem to perform very well. In the end, the generated images are just grey with some tiny fluctuations. The image includes plots of both losses. My code (inside .zip) basically only differs from the tutorial in trying to plot the histories of the losses.

TrainFluxTutorial
FluxDCGANtutorial.zip

@ToucheSir ToucheSir transferred this issue from FluxML/Flux.jl Feb 1, 2022
@mcabbott
Copy link
Member

mcabbott commented Feb 8, 2023

Comments above refer to the version on fluxml.github.io, which FluxML/fluxml.github.io#156 has deleted. Moving the issue to the model zoo.

@mcabbott mcabbott transferred this issue from FluxML/fluxml.github.io Feb 8, 2023
@dmetivie
Copy link

dmetivie commented Oct 27, 2023

I ran into the same problem with the current official doc tutorial.

After a lot of investigation (and being unfamiliar with Flux and API changes), I figured that the code showed there had been updated to match the new API by this commit.

I think the official tutorial need update, it is very confusing for new Flux user.
At least a warning should be thrown because the current code run but seems not to update the generator in training.
This is probably linked to this issue so should I PR a new version of the doc with the fix of commit?

@mcabbott
Copy link
Member

The top post links a version deleted from the website, the plan was to move these into the docs & update them. What you link as the "official tutorial" is the result of half this plan being done, but notice these are still hidden from the side-bar, as nobody got around to updating them (or better, arranging to have them automatically tested by CI).

As you say, the model zoo version was updated in #373. These changes could be copied back to the one in the docs. But perhaps it would be better just to delete the doc version, and have only the zoo version?

I think the version in the model zoo does run. But does it solve the issue reported here, "generated images are just grey with some tiny fluctuations"? I don't recall whether I looked into this in #373.

@dmetivie
Copy link

Yes it does solve the problem! I tried the code.
In particular, it includes change in API like setup optimizer and update(model,...) not update(params, ...).
I am not sure what exactly was happening in the version of the tutorial because no errors or warning showed.

Why not have a doc for model-zoo obtained from the scripts + literate.jl? It is more user/beginner-friendly than a GitHub Julia script. At least I liked the format of the doc tutorial with pictures and text.
Of course, the current scripts would need some updates just to work with literate. Then motivated authors could add more (text, image).
IMO removing tutorial format is a bit sad because there are too few in Julia for advanced examples like GAN.

@ToucheSir
Copy link
Member

Literate.jl integration was attempted at one point, but people ran out of time/interest before it could be implemented. Given there's not enough time to go around to keep even a lot of the model zoo up to date, we'd need a pretty significant contribution to get that running.

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

4 participants