Construct the NICE flow for the CIFAR-10 setup.
Paper-faithful CIFAR-10 configuration from Dinh et al., 2014 Figure 3: 3072 dimensions, four coupling layers with four hidden layers of 2000 units each, and a standard logistic prior.
Model Size
Parameters
pretrainedbool= False**overridesobject= {}NICEConfig field overrides forwarded into the
underlying config.Returns
NICEModelBare bijection 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 dequantised with uniform 1/128 noise and rescaled to
(CIFAR-10 is the one dataset given the wider
range). The released reference config for this dataset instead
stacks 8 coupling layers of 2400 units with a normal prior and no
input reordering — see the module docstring for how far overrides
reproduce it.
Examples
>>> import lucid
>>> from lucid.models.generative.nice import nice_cifar
>>> model = nice_cifar(input_dim=64, hidden_dim=16).eval()
>>> x = lucid.rand((1, 64)) * 2.0 - 1.0
>>> model.log_prob(x).shape
(1,)