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.1.tar.gz (675.6 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.1-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for discrete_distribution_network-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a0fc74695329c37547a6f12abba700ab553686ac4db3ce8e7984da914cd5c862
MD5 681786fd57512b20e6d9dcc47b96d0f3
BLAKE2b-256 5f1b880da4f6d3f3da10b770a5ef275f69c683f98ad46240388d3c7a57270bd6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for discrete_distribution_network-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cdd959a922337607465eb727bfb1050266b2c8dd4ec1aad777c2aed0819c64b3
MD5 1e7a957d4cde0dba92d2bd264cf5f7da
BLAKE2b-256 3ad4a769e13a6bd72d4c80291d0ad6e8c4675bb354398890fa46bebce306b168

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