class_docstr: Calculates the mean squared error of a tensor
class_docstr_tok: ["Calculates","the","mean","squared","error","of","a","tensor"]
code: def update(self, x: Tensor):
      mean = self.mean.get()
  
      if mean is not None and self.prev_mean is not None:
          rhs = (x - self.prev_mean) * (x - mean)
          if self.mse is None:
              self.mse = rhs
          else:
              self.mse += rhs
  
      # do not not clone
      self.prev_mean = mean.clone()
  
imports: from typing import Any, Callable, List, Optional, TYPE_CHECKING
  import torch
  from torch import Tensor
label_desc: Use image node_id 4 for calling the MSE obj's underlying member method code with example usage: obj.update(x) without return types