docstr: Fake quantize (quantize and dequantize) the weight with
  the quantization parameters for weight, this is used to
  simulate the numerics for the quantized weight in a quantized
  model
docstr_tok: ["Fake","quantize","(","quantize","and","dequantize",")","the","weight","with","the","quantization","parameters","for","weight",",","this","is","used","to","simulate","the","numerics","for","the","quantized","weight","in","a","quantized","model"]
code: def get_weight(self):
      """
      Fake quantize (quantize and dequantize) the weight with
      the quantization parameters for weight, this is used to
      simulate the numerics for the quantized weight in a quantized
      model
      """
      # suppress mypy warning
      assert isinstance(self.weight_scale, torch.Tensor)
      assert isinstance(self.weight_zero_point, torch.Tensor)
      if self.is_decomposed:
          return _quantize_and_dequantize_weight_decomposed(
              self.weight,  # type: ignore[arg-type]
              self.weight_qscheme,
              self.weight_dtype,
              self.weight_scale,
              self.weight_zero_point,
              self.weight_axis_int,
              self.weight_quant_min,
              self.weight_quant_max,
          )
      else:
          return _quantize_and_dequantize_weight(
              self.weight,  # type: ignore[arg-type]
              self.weight_qscheme,
              self.weight_dtype,
              self.weight_scale,
              self.weight_zero_point,
              self.weight_axis_int,
          )
  
file_path: pytorch/torch/ao/nn/quantized/reference/modules/utils.py
imports: import torch
  import typing
label_desc: Use image node_id 2 for calling the ReferenceQuantizedModule obj's underlying member method code with example usage: obj.get_weight() and returns: _quantize_and_dequantize_weight_decomposed, _quantize_and_dequantize_weight