EMCqMRI.core.base.base_signal_model module

class EMCqMRI.core.base.base_signal_model.SignalModel[source]

Bases: abc.ABC

Base class for implementation of likelihood models

abstract forward(kappa, *fixed_params)[source]

Abstract function that defines the forward pass of the signal model. Generates a synthetic signal based on a signal model. This function must implement any necessary loops for generation of sequence of signals

Parameters
  • kappa ([torch.Tensor]) – a torch.Tensor or a list of torch.Tensor containing independent parameters of the signal model.

  • *fixed_params ([tuple]) – any necessary fixed parameter of the signal model.

Raises

NotImplementedError – When the subclass does not override this method.

Returns

Simulated (or synthetic) signal.

Return type

([torch.Tensor])

abstract initialize_parameters()[source]

Initializes the independent parameters of the signal model. In general, these are the parameters that will be estimated by the inference model.

Raises

NotImplementedError – When the subclass does not override this method.

Returns

If list, each element contains a torch.Tensor of different types (e.g. images, scalars, etc.). Each torch.Tensor is defined as the parameter to be estimated by the inference model.

Return type

([torch.Tensor]) or ([list])