DPSDataFidelity#

class deepinv.sampling.DPSDataFidelity(denoiser=None)[source]#

Bases: NoisyDataFidelity

The DPS data-fidelity term.

This corresponds to the p(y|x) prior as proposed in Diffusion Probabilistic Models.

Parameters:

denoiser (deepinv.models.Denoiser) – Denoiser network.

xlogp(y|x)=(Id+xD(x))A(yA(D(x)))

Note

The preconditioning term is computed with automatic differentiation.

Parameters:

denoiser (deepinv.models.Denoiser) – Denoiser network

forward(x, y, physics, sigma, clip=False)[source]#

Returns the loss term d(A(Dx(σ)),y).

Parameters:
Returns:

(torch.Tensor) loss term.

Return type:

Tensor

grad(x, y, physics, sigma, *args, **kwargs)[source]#
Parameters:
Returns:

(torch.Tensor) score term.

Return type:

Tensor

Examples using DPSDataFidelity:#

Posterior Sampling for Inverse Problems with Stochastic Differential Equations modeling.

Posterior Sampling for Inverse Problems with Stochastic Differential Equations modeling.