Skip to content

changed nn.Tanh() output layers to nn.Sigmoid()#63

Open
HareshKarnan wants to merge 1 commit intoAntixK:masterfrom
HareshKarnan:master
Open

changed nn.Tanh() output layers to nn.Sigmoid()#63
HareshKarnan wants to merge 1 commit intoAntixK:masterfrom
HareshKarnan:master

Conversation

@HareshKarnan
Copy link
Copy Markdown

@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
Copy Markdown

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