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

Fix vae_mnist model #267

Merged
merged 7 commits into from Jan 19, 2021
Merged

Fix vae_mnist model #267

merged 7 commits into from Jan 19, 2021

Conversation

ghost
Copy link

@ghost ghost commented Jan 17, 2021

  • Replaces CUDAapi with CUDA
  • Replaces Flux.logitbinarycrossentropy with Flux.Losses.logitbinarycrossentropy
  • Makes the Encoder a functor so will actually be moved to the CPU before saving the BSON file

see also #266

@ghost ghost mentioned this pull request Jan 17, 2021
59 tasks
@CarloLucibello
Copy link
Member

Is generation fine or producing grey images?

@ghost
Copy link
Author

ghost commented Jan 17, 2021

Just grey images

@ghost
Copy link
Author

ghost commented Jan 19, 2021

Runs without issues and resulting images are ok now. It could use some improvement overall, but I think we should just leave it like this for now.

@CarloLucibello CarloLucibello merged commit b47ead3 into FluxML:master Jan 19, 2021
hinneburg added a commit to hinneburg/model-zoo that referenced this pull request Feb 1, 2021
In vae_plot.jl the sigmoid needs to be applied to the sampled
output from the decoder. Otherwise, the generated image
`output/manifold.png` is corrupted.

```
julia --project vae_plot.jl
┌ Warning: Mapping to the storage type failed; perhaps your data had
out-of-range values?
│ Try `map(clamp01nan, img)` to clamp values to a valid range.
└ @ ImageMagick
~/.julia/packages/ImageMagick/0LwpT/src/ImageMagick.jl:180
```
The gnome image viewer reports:
Fatal error reading PNG image file: PNG unsigned integer out of range.

The error was caused by the commits in FluxML#267 that removed the sigmoid
from last the decoder layer to enable the use of the more numerically
stable logitbinarycrossentropy. However, only the output in
[vae_mnist.jl](https://github.com/hinneburg/model-
zoo/blob/b0aaf6950580976f9e84c6acd409f3018f8df7f5/vision/vae_mnist/vae_mnist.jl#L160)
were adapted.
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

Successfully merging this pull request may close these issues.

2 participants