Skip to main content

Discrete Distribution Network

Project description

Discrete Distribution Network (wip)

Exploration into Discrete Distribution Network, by Lei Yang out of Beijing

Besides the split-and-prune, may also throw in an option for crossover (mixing of top 2 nodes to replace the pruned)

Install

$ discrete-distribution-network

Usage

import torch
from discrete_distribution_network.ddn import DDN

ddn = DDN(
    dim = 32,
    image_size = 256
)

images = torch.randn(2, 3, 256, 256)

loss = ddn(images)
loss.backward()

# after much training

sampled = ddn.sample(batch_size = 1)

assert sampled.shape == (1, 3, 256, 256)

Oxford flowers

Install uv, which will probably become the default in the near future

$ pip install uv

Then

$ uv run train_oxford_flowers.py

Citations

@misc{yang2025discretedistributionnetworks,
    title   = {Discrete Distribution Networks}, 
    author  = {Lei Yang},
    year    = {2025},
    eprint  = {2401.00036},
    archivePrefix = {arXiv},
    primaryClass = {cs.CV},
    url     = {https://arxiv.org/abs/2401.00036}, 
}

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

discrete_distribution_network-0.1.0.tar.gz (675.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

discrete_distribution_network-0.1.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file discrete_distribution_network-0.1.0.tar.gz.

File metadata

File hashes

Hashes for discrete_distribution_network-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9e1b04bceb78101b45db816a8e561c62924fcf919d2c144c162cc02e81c8e976
MD5 29379a704a3bedf117f2d5ba468d97b4
BLAKE2b-256 567742c37d772c341093c57a6cb2018cd18a78751ee337163f4ea8314009ec1d

See more details on using hashes here.

File details

Details for the file discrete_distribution_network-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for discrete_distribution_network-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1f60b1a129a9a724f0a20057e12bf694110df4407499144fd6be897c0468b49d
MD5 4fc94c49de363d50180d6a84c663fe58
BLAKE2b-256 3beccc5f683a0a08f4156e6bcbc7798eeaf4f0eb500e488cc9cdc27078032d49

See more details on using hashes here.

Supported by

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