ncsn_cifar_gen(pretrained: bool = False, overrides: object = {})Construct an NCSN CIFAR-10 model with DSM loss and .generate().
Same trunk as ncsn_cifar (CIFAR-10 setup,
noise levels), wrapped with the denoising score-matching loss and
annealed Langevin sampling.
Model Size
Parameters
pretrainedbool= FalseReserved for future weight registration; currently a no-op.
**overridesobject= {}Optional
NCSNConfig field overrides forwarded into the
underlying config.Returns
NCSNForImageGenerationCIFAR-10 NCSN wrapped with the DSM loss head and Langevin sampler.
Notes
Reference: Song and Ermon, NeurIPS, 2019 (arXiv:1907.05600); NCSNv2 in Song and Ermon, 2020 (arXiv:2006.09011).
Examples
>>> import lucid
>>> from lucid.models.generative.ncsn import ncsn_cifar_gen
>>> model = ncsn_cifar_gen().eval()
>>> x = lucid.randn((1, 3, 32, 32))
>>> out = model(x)
>>> out.sample.shape # raw score field
(1, 3, 32, 32)