LVAE
LVAE losses.
denoisplit_loss(model_outputs, targets, config, gaussian_likelihood=None, noise_model_likelihood=None)
Loss function for DenoiSplit.
Parameters:
-
model_outputs(tuple[Tensor, dict[str, Any]]) –Tuple containing the model predictions (shape is (B,
target_ch, [Z], Y, X)) and the top-down layer data (e.g., sampled latents, KL-loss values, etc.). -
targets(Tensor) –The target image used to compute the reconstruction loss. Shape is (B,
target_ch, [Z], Y, X). -
config(LVAELossConfig) –The config for loss function containing all loss hyperparameters.
-
gaussian_likelihood(GaussianLikelihood, default:None) –The Gaussian likelihood object.
-
noise_model_likelihood(NoiseModelLikelihood, default:None) –The noise model likelihood object.
Returns:
denoisplit_musplit_loss(model_outputs, targets, config, gaussian_likelihood, noise_model_likelihood)
Loss function for DenoiSplit.
Parameters:
-
model_outputs(tuple[Tensor, dict[str, Any]]) –Tuple containing the model predictions (shape is (B,
target_ch, [Z], Y, X)) and the top-down layer data (e.g., sampled latents, KL-loss values, etc.). -
targets(Tensor) –The target image used to compute the reconstruction loss. Shape is (B,
target_ch, [Z], Y, X). -
config(LVAELossConfig) –The config for loss function containing all loss hyperparameters.
-
gaussian_likelihood(GaussianLikelihood) –The Gaussian likelihood object.
-
noise_model_likelihood(NoiseModelLikelihood) –The noise model likelihood object.
Returns:
hdn_loss(model_outputs, targets, config, gaussian_likelihood, noise_model_likelihood)
Loss function for HDN.
Parameters:
-
model_outputs(tuple[Tensor, dict[str, Any]]) –Tuple containing the model predictions (shape is (B,
target_ch, [Z], Y, X)) and the top-down layer data (e.g., sampled latents, KL-loss values, etc.). -
targets(Tensor) –The target image used to compute the reconstruction loss. In this case we use the input patch itself as target. Shape is (B,
target_ch, [Z], Y, X). -
config(LVAELossConfig) –The config for loss function containing all loss hyperparameters.
-
gaussian_likelihood(GaussianLikelihood) –The Gaussian likelihood object.
-
noise_model_likelihood(NoiseModelLikelihood) –The noise model likelihood object.
Returns:
musplit_loss(model_outputs, targets, config, gaussian_likelihood, noise_model_likelihood=None)
Loss function for muSplit.
Parameters:
-
model_outputs(tuple[Tensor, dict[str, Any]]) –Tuple containing the model predictions (shape is (B,
target_ch, [Z], Y, X)) and the top-down layer data (e.g., sampled latents, KL-loss values, etc.). -
targets(Tensor) –The target image used to compute the reconstruction loss. Shape is (B,
target_ch, [Z], Y, X). -
config(LVAELossConfig) –The config for loss function (e.g., KL hyperparameters, likelihood module, noise model, etc.).
-
gaussian_likelihood(GaussianLikelihood) –The Gaussian likelihood object.
-
noise_model_likelihood(Optional[NoiseModelLikelihood], default:None) –The noise model likelihood object. Not used here.
Returns: