pytorch-generative  by EugenHotaj

PyTorch library for generative modeling

created 5 years ago
440 stars

Top 69.0% on sourcepulse

GitHubView on GitHub
Project Summary

This library provides PyTorch implementations of state-of-the-art generative models, offering useful abstractions for common building blocks and utilities for training and debugging. It targets researchers and practitioners in deep learning who want to easily experiment with and implement generative models. The library aims to simplify the process of building, training, and reproducing results from various generative architectures.

How It Works

The library offers both high-level model implementations (e.g., ImageGPT, PixelSNAIL) and lower-level building blocks (e.g., CausalAttention, NCHWLayerNorm). This modular design allows users to either directly use pre-built models or construct custom architectures by composing these reusable components. The approach emphasizes providing clean, reference implementations that facilitate reproducibility and understanding of complex generative models.

Quick Start & Requirements

  • Installation: Clone the repository and install requirements:
    git clone https://www.github.com/EugenHotaj/pytorch-generative
    cd pytorch-generative
    pip install -r requirements.txt
    
  • Testing: Run tests with python -m unittest discover.
  • Reproducing Results: Use the train.py script with the --model and --logdir arguments. Example: python train.py --model image_gpt --logdir /tmp/run --use-cuda. TensorBoard integration is provided for visualization.
  • Google Colab: Clone the repo and move the pytorch_generative directory into the top-level directory.
  • Dependencies: PyTorch. CUDA is recommended for training.

Highlighted Details

  • Provides reference implementations for Autoregressive Models (PixelSNAIL, ImageGPT, PixelCNN), Variational Autoencoders (VAE, VQ-VAE), and Normalizing Flows (NICE).
  • Includes utilities for training, debugging, and TensorBoard visualization.
  • Models are implemented as PyTorch Modules, allowing direct instantiation and use.
  • Offers lower-level building blocks for custom model construction.

Maintenance & Community

  • The repository appears to be maintained by Eugen Hotaj.
  • No specific community links (Discord, Slack) or roadmap are mentioned in the README.

Licensing & Compatibility

  • The README does not explicitly state a license. The repository should be checked for a LICENSE file for definitive terms.

Limitations & Caveats

  • The README does not specify compatibility with different PyTorch versions or Python versions beyond what requirements.txt might imply.
  • Benchmarks are primarily reported on Binarized MNIST, and performance on other datasets or tasks is not detailed.
Health Check
Last commit

1 year ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
4 stars in the last 90 days

Explore Similar Projects

Starred by Tim J. Baek Tim J. Baek(Founder of Open WebUI), Stas Bekman Stas Bekman(Author of Machine Learning Engineering Open Book; Research Engineer at Snowflake), and
7 more.

pytorch-tutorial by yunjey

0.1%
32k
PyTorch tutorial for deep learning researchers
created 8 years ago
updated 1 year ago
Feedback? Help us improve.