Skip to content

DSMScore

DSMScore(**kwargs)

Bases: GenericModelMixin, Model

Noise-conditional score model with inference-time sigma fallback.

Parameters:

  • **kwargs (dict, default: {} ) –

    Forwarded to pfi.base.Model.

dim_output()

Return spatial score output dimension.

Returns:

  • int –

    Spatial output dimension.

dim_spatial()

Return number of spatial dimension of the score network.

Returns:

  • int –

    Number of spatial dimension in net_ (by definition the first dimensions).

evaluate_net(x)

Evaluate network with dimension selection, scaling, and transform.

Parameters:

  • x (Tensor) –

    Full input tensor including spatial coordinates and, by convention, time in the last coordinate.

Returns:

  • Tensor –

    Final model output after preprocessing and postprocessing.

init_model(X, generator=None)

Initialize network and set noise_lvl from the minimum sigma in training data.

Parameters:

  • X (Tensor) –

    Noisy training inputs with last dimension ndim + 2 (layout [x_1, ..., x_ndim, sigma, t]).

  • generator (Generator or None, default: None ) –

    Optional RNG for reproducible weight initialization.

Returns:

  • self ( DSMScore ) –

    Initialized model.

is_autonomous()

Return False for non-autonomous models.

Returns:

  • bool –

    Always False.

is_gradient()

Return False for non-gradient models.

Returns:

  • bool –

    Always False.