← all repositories
openai/pixel-cnn

OpenAI's 2017 generative model, frozen in TensorFlow amber

A reference implementation of PixelCNN++ that squeezes better image density out of autoregressive pixels—if you can still run TensorFlow 1.x.

2k stars Python Image · Video · Audio
pixel-cnn
Velocity · 7d
+0.5
★ / day
Trend
steady
star history

What it does

PixelCNN++ generates images one pixel at a time, left-to-right, top-to-bottom, by predicting a probability distribution for each pixel conditioned on everything that came before. This repo is OpenAI’s official TensorFlow implementation of the 2017 ICLR paper, with support for training on CIFAR-10 and Small ImageNet across multiple GPUs.

The interesting bit

The “++” isn’t marketing fluff—it swaps the original softmax-over-intensities for a discretized logistic mixture likelihood, which is how they shaved the bits-per-dimension from 3.03 down to 2.92 on CIFAR-10. The README is admirably blunt about hardware requirements: 8 Maxwell TITAN Xs, 10 hours to hit 3.0 bpd, five days to converge to 2.92.

Key highlights

  • Ships with a pretrained checkpoint (656MB) that hits the paper’s 2.92 bpd number
  • Multi-GPU training via train.py with CUDA_VISIBLE_DEVICES and --nr_gpu flags
  • DataLoader classes in data/ are meant to be cloned for custom datasets
  • Includes class-conditional sampling (the right-hand column of the sample image)

Caveats

  • Explicitly archived: “code is provided as-is, no updates expected”
  • Requires tensorflow-gpu, which pins you to TensorFlow 1.x and Python 3 versions that are increasingly archaeological
  • The “pixel-cnn-rotations” section at the bottom of the README is unexplained—possibly a stub, possibly a copy-paste ghost

Verdict

Worth a look if you’re reproducing 2017 generative-model baselines or studying how autoregressive density estimation worked before diffusion ate everything. Skip it if you want maintained code, modern PyTorch, or training that doesn’t require scrounging decade-old GPUs.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.