cascade.nn.mean_squared_error

cascade.nn.mean_squared_error(x, y, dim, keepdim=False, weight=None)[source]

Compute the mean squared error along a specified dimension

Parameters:
  • x (Tensor) – Input tensor x

  • y (Tensor) – Input tensor y

  • dim (int) – Dimension along which to compute the error

  • keepdim (bool) – Whether to keep the dimension after reduction

  • weight (Tensor | None) – Optional weight tensor

Return type:

Tensor

Returns:

Mean squared error tensor