sagelywizard / pytorch-mdn Goto Github PK
View Code? Open in Web Editor NEWMixture Density Networks for PyTorch
License: MIT License
Mixture Density Networks for PyTorch
License: MIT License
I had an issue installing this repo by setup.py:
pip install git+https://github.com/sagelywizard/pytorch-mdn
the error is:
error: error in 'egg_base' option: 'src' does not exist or is not a directory
changing src to mdn in this line and this line solved the problem. I guess the issue is solved for me but not sure it should be corrected in the source file or not
L75 in mdn.py
returns data is not defined
.
data
needs to be replaced by target
.
The sample method can be sped up ~10x by using torch.gather
def sample(self, pi, sigma, mu):
"""Draw samples from a MoG."""
categorical = Categorical(pi)
pis = categorical.sample().unsqueeze(1)
sample = Variable(sigma.data.new(sigma.size(0), 1).normal_())
# Gathering from the two Gaussian Distribution based on sampled indices
sample = sample * sigma.gather(1, pis) + mu.gather(1, pis)
return sample
Line 75 in 8bd3415
Should data
be target
?
First want to thank the creator of this repo, although simple it is a great and convenient implementation of MDN for the community.
During training, there is numerical instability problems arising from the multiplication of the probability that can be changed to addition.
In def mdn_loss(pi, sigma, mu, data)
data
should be target
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.