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

The hyper-parameter "kl_weight: float = 1.0" leads to the futility of switch loss #32

Open
Uigi1600 opened this issue Feb 25, 2025 · 0 comments

Comments

@Uigi1600
Copy link

Thanks for this useful tool. I used it on my scRNA-seq data and learned a lot about velocity model and VAE code from VeloVI.

However, when i read your _module.py code, i find a unreasonable part in "loss" function:

loss = local_loss + self.penalty_scale * (1 - kl_weight) * end_penalty

This part correspond to article methods:
Image

But since the hyper-parameter "kl_weight" was set to 1.0 in this model, the switch loss "end_penalty" is actually weighted to 0, which means there is only elbo loss in VeloVI model but no switch loss.

Is this a bug or i have any misunderstand of your code or article? Please take some time to explain. it seems like the code is inconsistent to your statement in the article.

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

No branches or pull requests

1 participant