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)

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.0.11.tar.gz (673.9 kB view details)

Uploaded Source

Built Distribution

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

File details

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

File metadata

File hashes

Hashes for discrete_distribution_network-0.0.11.tar.gz
Algorithm Hash digest
SHA256 7fa12745275642894fa3565945bd11723ab9a855902a700310f6dd088332211f
MD5 28221f700172c5a3a22959f9d31d2bad
BLAKE2b-256 a0cfeb6f6372d4c860eae7cc99f97fc4f6455b988d39c40b2aca6665e8bc0d79

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for discrete_distribution_network-0.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 ae9890ce854f3f1d05c62275091ded8fb939965bf0ee3f9ae0b41681c02bc454
MD5 82be95e2df2bdf3cbf84bf9154af987b
BLAKE2b-256 73b016c227d961fcaf53c5192d9aafbe0978aeab86a97f0b8b3d261dabac04f7

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