Skip to content

Conversation

@roszcz
Copy link
Member

@roszcz roszcz commented Sep 29, 2023

VAE Reconstruction:

embedding_size=256
image

embedding_size=16
image

) -> dict[str, torch.Tensor]:
recon_batch, mu, logvar = model(data)

magic_factor = 0.1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it be a good idea to move the magic_factor to config?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For sure, I only need to remember what it is first 🥲

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We had some trouble with exploding gradients in this model iirc, this might be the value to control it? Some implementations also used weights near the loss, it might be one of them?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I recall it's about scaling the loss components, we had a discussion about it here: #7 I wanted to get rid of the sum reduction, to get operate on per-sample values. I think chat gpt advised me to add a scaling factor of reconstruction loss :)

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.

3 participants