Comments (1)
Hmm, there is definitely something wrong but your solution is not correct.
input[1] = mu
input[2] = log(sigma^2)
The forward is:
-0.5 * (log(sigma) + log(2pi)) - 0.5 * (x - mu)^2/sigma^2
The backward for log(sigma^2) is:
- 0.25 + 0.5 * (x - mu)^2 / sigma^2
derivative of 1/sigma^2 with respect to log(sigma^2) is:
-exp(-log(sigma^2)) (using: 1/sigma^2 = exp(-log(sigma^2)))
The minus cancels the minus of - 0.5 * (x - mu)^2 and you reach the above mentioned backward.
See the commit for further details :). Thanks for pointing it out!
from vae-torch.
Related Issues (15)
- [Feature request] Full variational Bayes HOT 2
- Error ! HOT 2
- Why doing criterion.sizeAverage = true makes everything not work? HOT 3
- Does this project include image generation code? HOT 1
- GaussianCriterion gradient issue HOT 1
- how much time it takes.... HOT 5
- Positive Lowerbound? HOT 1
- NLL number after change of dataset? HOT 3
- typo? HOT 1
- config for Adam HOT 8
- Use of exp in the Reparametrization HOT 21
- divide loss by batch size HOT 1
- Inputs to KLD criterion are mean and variance? HOT 2
- lower bond? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vae-torch.