Skip to content
fn

realnvp_lsun

→RealNVPModel
realnvp_lsun(pretrained: bool = False, overrides: object = {})

Construct the RealNVP flow for the LSUN 64 x 64 setup.

Paper-faithful configuration from Dinh et al., 2016 §4.1 — the same five-scale, 2-residual-block architecture used for every 64 x 64 dataset. One factory covers the three reported LSUN categories (bedroom, tower, church outdoor); they differ only in training data.

Model Size

Parameters

pretrainedbool= False
No checkpoint is published for realnvp_lsun, so True raises NotImplementedError rather than return randomly initialised weights.
**overridesobject= {}
Optional RealNVPConfig field overrides forwarded into the underlying config.

Returns

RealNVPModel

Bare bijection configured with the LSUN setup.

Notes

Reference: Dinh, Sohl-Dickstein, and Bengio, "Density Estimation Using Real NVP", ICLR, 2017 (arXiv:1605.08803), §4.1 and Table 1. Reported validation results: 2.72 (bedroom), 2.81 (tower) and 3.08 (church outdoor) bits/dim. Images are downsampled so the smallest side is 96 px, then randomly cropped to 64 x 64.

Examples

>>> from lucid.models.generative.realnvp import realnvp_lsun
>>> model = realnvp_lsun().eval()
>>> model.config.residual_blocks
2

Used by 1