Skip to content
fn

realnvp_imagenet32

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

Construct the RealNVP flow for the Imagenet 32 x 32 setup.

Paper-faithful configuration from Dinh et al., 2016 §4.1: four scales (so the recursion ends on a 4 x 4 map), coupling networks of 4 residual blocks with 32 feature maps at the first scale, doubling per scale.

Model Size

Parameters

pretrainedbool= False
No checkpoint is published for realnvp_imagenet32, 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 Imagenet 32 x 32 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 result: 4.28 bits/dim (4.26 train).

Examples

>>> from lucid.models.generative.realnvp import realnvp_imagenet32
>>> model = realnvp_imagenet32().eval()
>>> model.config.num_scales
4

Used by 1