Skip to main content

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
# ....
mdn = MDN(in_dim, out_dim, n_components)
# ....
mu, sigma, lambda_ = mdn(net(input_data))
dist = MDDistribution(mu, sigma, lambda_)
loss = dist.nll(targets).mean()

# ...
samples, clusters = dist.sample(n=20)  # draw 20 samples

For a more thorough example see example.ipynb.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Mixture-Density-Nets-0.1.1.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

Mixture_Density_Nets-0.1.1-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file Mixture-Density-Nets-0.1.1.tar.gz.

File metadata

  • Download URL: Mixture-Density-Nets-0.1.1.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for Mixture-Density-Nets-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a14ef9b5cbaeb46f579334cd3b15417d5ebb3482e4142d9ce70a135fb9d593b9
MD5 740ab55914e76ec70cf96eca342e35d5
BLAKE2b-256 a06e673a54c7766af0d19f21bd42cbc8af98d0118789400f192dfed652b27acb

See more details on using hashes here.

File details

Details for the file Mixture_Density_Nets-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for Mixture_Density_Nets-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dac5a95f589be5d88318a744e0765fbbd0af19dd82de0a93b7cd1165ba7a261c
MD5 0622c87b4cc1b4c554199f5782df7ee1
BLAKE2b-256 3f701abcae4f795b718dff08d80aa99cbeca0d989b7985ccdcfef06c84f110cc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page