class_docstr: Mean Logger for a Shadow module.
  
  A logger for a Shadow module whose purpose is to record the rolling mean
  of the data passed to the floating point and quantized models
docstr: Compute the average of quantized and floating-point data from modules.
  
  The inputs x,y are output data from the quantized and floating-point modules.
  x is for the quantized module, y is for the floating point module
docstr_tok: ["Compute","the","average","of","quantized","and","floating-point","data","from","modules",".","The","inputs","x",",","y","are","output","data","from","the","quantized","and","floating-point","modules",".","x","is","for","the","quantized","module",",","y","is","for","the","floating","point","module"]
code: def forward(self, x, y):
      """Compute the average of quantized and floating-point data from modules.
  
      The inputs x,y are output data from the quantized and floating-point modules.
      x is for the quantized module, y is for the floating point module
      """
      if x.is_quantized:
          x = x.dequantize()
  
      self.count += 1
      if self.stats["quantized"] is None:
          self.stats["quantized"] = x
          self.quant_sum = x
      else:
          self.quant_sum += x
          self.stats["quantized"] = self.quant_sum / self.count
  
      if self.stats["float"] is None:
          self.stats["float"] = y
          self.float_sum = y
      else:
          self.float_sum += y
          self.stats["float"] = self.float_sum / self.count
  
file_path: pytorch/torch/ao/quantization/_correct_bias.py
imports: import torch
  import torch.nn
  import torch.ao.nn.quantized
  import torch.ao.quantization
  import torch.ao.ns._numeric_suite
label_desc: Use image node_id 2 for calling the MeanShadowLogger obj's underlying member method code with example usage: obj.forward(x, y) without return types