tools.mse

Contents

tools.mse#

bartorch.tools.mse()#

Mean squared error mean |input - reference|² over every element.

Parameters:
  • reference (torch.Tensor) – Arrays of the same shape.

  • input (torch.Tensor) – Arrays of the same shape.

  • magnitude (bool, default=False) – Compare magnitudes, mean (|input| - |reference|)², each the root sum of squares over the coil axis of (..., coils, z, y, x).

Returns:

The error.

Return type:

float