Skip to content
fn

realnvp_celeba_gen

→RealNVPForImageGeneration
realnvp_celeba_gen(pretrained: bool = False, overrides: object = {})

RealNVP generator for CelebA 64 x 64.

Same bijection as realnvp_celeba, wrapped with the bits/dim objective and the ancestral sampler. This is the setup the paper's latent-space interpolation figures come from — the flow is a bijection, so interpolating between two encode outputs and decoding gives a semantically smooth path with no encoder approximation.

Model Size

Parameters

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

Returns

RealNVPForImageGeneration

Generator configured with the CelebA setup.

Notes

Reference: Dinh, Sohl-Dickstein, and Bengio, "Density Estimation Using Real NVP", ICLR, 2017 (arXiv:1605.08803). Reported: 3.02 bits/dim.

Examples

>>> from lucid.models.generative.realnvp import realnvp_celeba_gen
>>> model = realnvp_celeba_gen().eval()
>>> model.generate(n_samples=1).samples.shape
(1, 3, 64, 64)

Used by 1