Skip to content
fn

realnvp_lsun_gen

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

RealNVP generator for LSUN 64 x 64.

Same bijection as realnvp_lsun, wrapped with the bits/dim objective and the ancestral sampler.

Model Size

Parameters

pretrainedbool= False
No checkpoint is published for realnvp_lsun_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 LSUN setup.

Notes

Reference: Dinh, Sohl-Dickstein, and Bengio, "Density Estimation Using Real NVP", ICLR, 2017 (arXiv:1605.08803). Reported: 2.72 (bedroom), 2.81 (tower), 3.08 (church outdoor) bits/dim.

Examples

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

Used by 1