nice_cifar_gen(pretrained: bool = False, overrides: object = {})NICE generator for the CIFAR-10 setup (NLL loss + .generate()).
Same bijection as nice_cifar, wrapped with the exact
maximum-likelihood objective and the ancestral sampler. This is the
weakest of the four experiments in perceptual terms — NICE's
volume-preserving couplings cannot model natural-image texture — and
the reason RealNVP replaced additive couplings with affine ones.
Model Size
Parameters
pretrainedbool= FalseReserved for future weight registration; currently a no-op.
**overridesobject= {}Optional
NICEConfig field overrides forwarded into the
underlying config.Returns
NICEForImageGenerationGenerator configured with the CIFAR-10 setup and any overrides.
Notes
Reference: Dinh, Krueger, and Bengio, "NICE: Non-linear Independent Components Estimation", ICLR Workshop, 2015 (arXiv:1410.8516), Figure 3. Reported test log-likelihood: 5371.78 nats on ZCA-whitened data in .
Examples
>>> from lucid.models.generative.nice import nice_cifar_gen
>>> model = nice_cifar_gen().eval()
>>> out = model.generate(n_samples=2)
>>> out.samples.shape
(2, 3072)