Skip to content

DIYer22/sddn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sddn: Core Library of Discrete Distribution Networks

sddn is the abbreviation of "Splitable Discrete Distribution Networks".

This repo only includes the core implementation of DDN and simple experiments (2D density estimation and MNIST example).

More info about DDN at: https://discrete-distribution-networks.github.io/

# Install by pip
pip install sddn

▮ Toy Example for 2D density estimation

Need install distribution_playground: 2D probability distribution playground for generative Models

pip install distribution_playground
git clone https://github.com/DIYer22/sddn.git
cd sddn
python toy_exp.py

toy_exp.py includes:

  • Training a tiny DDN to fit probability densities
  • Logging and recording divergence metrics between sampling results and GT density maps
  • Saving visualization images of final sampling results
  • Creating cool "optimization process GIFs":


DDN optimization process of 2D density estimation [details]
Left: All samples; Right: GT density

▮ MNIST example

python mnist.py

mnist.py includes complete experiment on training DDN using MNIST.
It is recommended to run this experiment in an IPython environment, such as Jupyter Lab.

For make video "Latent Space Visualization"

python mnist.py --outputk8_for_vis

Will save image of "Hierarchical Generation Visualization of DDN" like blow every iter:

These visualization images will form a video like DDN_latent_video

▮ Citation

@inproceedings{yang2025discrete,
  title     = {Discrete Distribution Networks},
  author    = {Lei Yang},
  booktitle = {The Thirteenth International Conference on Learning Representations},
  year      = {2025},
  url       = {https://openreview.net/forum?id=xNsIfzlefG}}

License: MIT License

About

Core Library of Discrete Distribution Networks (ICLR 2025)

Topics

Resources

Stars

Watchers

Forks

Languages