A small PyTorch library for Mixture Density Networks.
Project description
🎨 Mixture-Density-Nets
A small PyTorch library for Mixture Density Networks.
Install
simply run
pip install mixture-density-nets
Example
from mixture_density_nets import MDN, MDDistribution
# ....
mu, sigma, lambda_ = net(input_data)
dist = MDDistribution(mu, sigma, lambda_)
loss = dist.nll(targets).mean()
# ...
samples, clusters = dist.sample(n=20) # draw 20 samples
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for Mixture-Density-Nets-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f60ddc3ec903cbf57bebdbe95719ee917847b8682e948ea4b4e00473b86f3d6f |
|
MD5 | a72df20c24c27f6e64fd3a53ecc92804 |
|
BLAKE2b-256 | f43d86934b2810ecdd6aa24dfa12c3f7fe050168d29074a37f2056ec0c5e0411 |
Close
Hashes for Mixture_Density_Nets-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c9fca90d87aee59800b250ee7e00157468c459dcd0df7711caf0a84dcb33417 |
|
MD5 | 24ecd06a6281df38bf583b1fef182433 |
|
BLAKE2b-256 | 6106483952a91de3d0e98d06801fc2c898051ab1156db8d5647f33f97cc68cf8 |