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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for discrete_distribution_network-0.1.4.tar.gz
Algorithm Hash digest
SHA256 791869076bde6b8c288654353e467c8ce18699ff22049360129f066ef75a59fb
MD5 7e72c288d68a627828bd97642d375b45
BLAKE2b-256 419a21eb4e2ebfce11b1b7afed21a1e0c141f9fb7109a5487c26aa781fbd5820

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for discrete_distribution_network-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 580ef4a0a884d4505d3b1e58ac5516963e74bd28b341c2f001635a71a1da6067
MD5 b6fe6f83d995e58d85a8a1407e5059ee
BLAKE2b-256 edd7255e38a40f5b6e9cd9defe8d30acb7dc11cb733850655f90da50aeaaa8b6

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