class_docstr: Computes the Mean Squared Error loss.
  MSEMetric for this loss will be reporting the mean square error between length ratios.
class_docstr_tok: ["Computes","the","Mean","Squared","Error","loss",".","MSEMetric","for","this","loss","will","be","reporting","the","mean","square","error","between","length","ratios","."]
docstr: Returns MSE loss.
  
  :param length_predictions: Length predictions. Shape: (batch_size,).
  :param labels: Targets. Shape: (batch_size,).
  :return: MSE loss of length predictions of the batch.
code: def forward(
      self, length_predictions: pt.Tensor, labels: pt.Tensor
  ) -> Tuple[pt.Tensor, pt.Tensor]:
      """
      Returns MSE loss.
  
      :param length_predictions: Length predictions. Shape: (batch_size,).
      :param labels: Targets. Shape: (batch_size,).
      :return: MSE loss of length predictions of the batch.
      """
      # (batch_size,)
      loss = (self.weight / 2) * pt.square(length_predictions - labels)
      # (1,)
      loss = loss.sum()
      num_samples = pt.ones_like(length_predictions).sum()
      return loss, num_samples
  
imports: import logging
  import math
  from abc import ABC, abstractmethod
  from typing import Any, Dict, Optional, Tuple
  import torch
  import numpy
  from .None import constants
  from .None import utils
label_desc: Use image node_id 2 for calling the MSELoss obj's underlying member method code with example usage: obj.forward(length_predictions, labels) and returns: loss,  num_samples