Reparametrization in VGAE model can cause NAN's
See original GitHub issue❓ Questions & Help
While, the implementation of the reparametrization is clean and conventional it can potentially lead to NaN's
as the self.__logvar__
term is not controlled. This behavior is dependent on the use case, and for the most part will not cause problems for many applications but I believe a better fix could be something like to add another line after : https://github.com/rusty1s/pytorch_geometric/blob/master/torch_geometric/nn/models/autoencoder.py#L231
self.__logvar__ = torch.clamp(self.__logvar__,min=LOG_VAR_MIN,max=LOG_VAR_MAX)
Where, LOG_VAR_MIN
and LOG_VAR_MAX
are suitable constants. This prevents numerical issues (underflow/overflow) that can happen during optimization.
Issue Analytics
- State:
- Created 4 years ago
- Comments:14 (7 by maintainers)
Top Results From Across the Web
Reparametrization in VGAE model can cause NAN's #500
Questions & Help While, the implementation of the reparametrization is clean and conventional it can potentially lead to NaN's as the self.
Read more >How does the reparameterization trick for VAEs work and why ...
Intuitively, in its original form, VAEs sample from a random node z which is approximated by the parametric model q(z∣ϕ,x) of the true...
Read more >A Reparameterization Multifeature Fusion CNN for ...
Aiming at arrhythmia heartbeats classification, a novel multifeature fusion deep learning-based method is proposed.
Read more >Getting Nan values after first ietration - autograd
Hi, I am performing multilabel classification task. I am implementing the concept of Graph Variational Autoencoders.
Read more >Variational Graph Author Topic Modeling
In this paper, we will extend VGAE as a topic model and incor- porate auxiliary authorship A and publication venues V. Definition 3.2...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Added to master. Thank you!
Small correction
LOG_VAR_MAX=20
blows up still so a lower value like10
is more stable. But other than that everything is as you predicted.