Skip to content

Fix CelebA preprocessing normalization mismatch - #110

Open
nagateja-naidu wants to merge 1 commit into
AntixK:masterfrom
nagateja-naidu:fix-normalization-issue-108
Open

Fix CelebA preprocessing normalization mismatch#110
nagateja-naidu wants to merge 1 commit into
AntixK:masterfrom
nagateja-naidu:fix-normalization-issue-108

Conversation

@nagateja-naidu

Copy link
Copy Markdown

#Overview

This PR mainly delas with the normalization mismatch as reported in the issue #108 .

###Problem

The VanillaVAE decoder uses nn.Tanh(), which produces reconstructed images in the range [-1, 1]. However, the CelebA preprocessing pipeline only applies transforms.ToTensor(), resulting in input images in the range [0, 1]. Since the reconstruction loss is computed between the reconstructed output and the input tensor using, the input and output ranges are different.

Solution

This PR adds:

transforms.Normalize(
    (0.5, 0.5, 0.5),
    (0.5, 0.5, 0.5)
) to both training and validation processing pipeline such that the input tensor and reconstruction output ranges are same. 

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.

1 participant