spyrit.core.recon.Denoise_layer.forward

Denoise_layer.forward(sigma_meas_squared: tensor) tensor[source]

Fully defines the Wiener filter with the measurement variance.

This outputs \(\sigma_\text{prior}^2/(\sigma_\text{prior}^2 + \sigma^2_\text{meas})\), where \(\sigma^2_\text{meas}\) is the measurement variance (see sigma_meas_squared) and \(\sigma_\text{prior}\) is the standard deviation prior defined upon construction of the class (see self.weight).

Note

The measurement variance should be squared before being passed to this method, unlike the standard deviation prior (defined at construction).

Args:

sigma_meas_squared (torch.tensor): input tensor \(\sigma^2_\text{meas}\) of shape \((*, in\_features)\)

Returns:

torch.tensor: The multiplicative filter of shape \((*, in\_features)\)

Shape:
  • Input: \((*, in\_features)\)

  • Output: \((*, in\_features)\)