data
ScoreSDEOutput
extends
ModelOutputScoreSDEOutput(score: Tensor, noise: Tensor, target: Tensor, std: Tensor, loss: Tensor | None = None)What the model returns for a batch.
Attributes
scoreTensor at the perturbed sample, same shape
as the input.
noiseTensorWhat the network predicted, before it was divided by the standard
deviation.
targetTensorThe noise actually added by the perturbation kernel. Returned
because the objective is the error against it and recomputing it
would mean redrawing.
stdTensorThe perturbation kernel's scale at the sampled times,
(N,).lossTensor or NoneThe denoising score-matching objective, set only by
ScoreSDEForImageGeneration.Examples
>>> import lucid
>>> from lucid.models import score_sde_vp
>>> model = score_sde_vp(sample_size=8, base_channels=8,
... channel_mult=(1,), num_res_blocks=1, resnet_groups=4,
... attention_resolutions=()).eval()
>>> out = model(lucid.randn((1, 3, 8, 8)))
>>> out.score.shape
(1, 3, 8, 8)