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
NMLikelihoodConfig
#
Bases: BaseModel
Noise model likelihood configuration.
NOTE: we need to define the data mean and std here because the noise model is trained on not-normalized data. Hence, we need to unnormalize the model output to compute the noise model likelihood.
Source code in src/careamics/config/likelihood_model.py
data_mean = 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 = 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)).