Skip to content

Conversation

@HareshKarnan
Copy link

@HareshKarnan HareshKarnan commented Jul 7, 2022

The input image is normalized between 0-1, so the output should be a nn.Sigmoid() layer instead of nn.Tanh(). Note that nn.Tanh() may also work, but using nn.Sigmoid() is more appropriate and will make the learning easier since the network can now only output values between 0-1 every pixel.

@DerEchteFeuerpfeil
Copy link

Had the same issue with the VanillaVAE out-of-the-box when converting first iteration samples to a PIL Image. Commenting to bump this up.

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