likelihood_model
Likelihood model.
Tensor = Annotated[Union[np.ndarray, torch.Tensor], PlainSerializer(_array_to_json, return_type=str), PlainValidator(_to_torch)]
module-attribute
#
Annotated tensor type, used to serialize arrays or tensors to JSON strings and deserialize them back to tensors.
GaussianLikelihoodConfig
#
Bases: BaseModel
Gaussian likelihood configuration.
Source code in src/careamics/config/likelihood_model.py
logvar_lowerbound: Union[float, None] = None
class-attribute
instance-attribute
#
The lowerbound value for log-variance.
predict_logvar: Optional[Literal['pixelwise']] = None
class-attribute
instance-attribute
#
If pixelwise
, log-variance is computed for each pixel, else log-variance is not computed.
NMLikelihoodConfig
#
Bases: BaseModel
Noise model likelihood configuration.
Source code in src/careamics/config/likelihood_model.py
data_mean: Tensor = torch.zeros(1)
class-attribute
instance-attribute
#
The mean of the data, used to unnormalize data for noise model evaluation. Shape is (target_ch,) (or (1, target_ch, [1], 1, 1)).
data_std: Tensor = torch.ones(1)
class-attribute
instance-attribute
#
The standard deviation of the data, used to unnormalize data for noise model evaluation. Shape is (target_ch,) (or (1, target_ch, [1], 1, 1)).
noise_model: Optional[NoiseModel] = Field(default=None, exclude=True)
class-attribute
instance-attribute
#
The noise model instance used to compute the likelihood.