nice_mnist_gen(pretrained: bool = False, overrides: object = {})NICE generator for the MNIST setup (NLL loss + .generate()).
Same bijection as nice_mnist, wrapped with the exact
maximum-likelihood objective and the ancestral sampler. Sampling is a
single parallel pass: draw from the logistic prior, return
.
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 MNIST setup and any overrides.
Notes
Reference: Dinh, Krueger, and Bengio, "NICE: Non-linear Independent
Components Estimation", ICLR Workshop, 2015 (arXiv:1410.8516),
Figure 3. Samples come back in the dequantised training space, not in
[0, 255].
Examples
>>> from lucid.models.generative.nice import nice_mnist_gen
>>> model = nice_mnist_gen(input_dim=64, hidden_dim=16).eval()
>>> model.generate(n_samples=4).samples.shape
(4, 64)