class_docstr: Tensor quantizer module
  
  This module uses tensor_quant or fake_tensor_quant function to quantize a tensor. And wrappers variable, moving
  statistics we'd want when training a quantized network.
  
  Experimental features:
      ``clip`` stage learns range before enabling quantization.
      ``calib`` stage runs calibration
  
  Args:
      quant_desc: An instance of :func:`QuantDescriptor <csrc.pytorch.pytorch_quantization.tensor_quant.QuantDescriptor>`.
      disabled: A boolean. If True, by pass the whole module returns input. Default False.
      if_quant: A boolean. If True, run main quantization body. Default True.
      if_clip: A boolean. If True, clip before quantization and learn amax. Default False.
      if_calib: A boolean. If True, run calibration. Not implemented yet. Settings of calibration will probably
          go to :func:`QuantDescriptor <csrc.pytorch.pytorch_quantization.tensor_quant.QuantDescriptor>`.
  
  Raises:
  
  Readonly Properties:
      - axis:
      - fake_quant:
      - scale:
      - step_size:
  
  Mutable Properties:
      - num_bits:
      - unsigned:
      - amax:
class_docstr_tok: ["Tensor","quantizer","module","This","module","uses","tensor_quant","or","fake_tensor_quant","function","to","quantize","a","tensor",".","And","wrappers","variable",",","moving","statistics","we","'d","want","when","training","a","quantized","network",".","Experimental","features",":","``","clip","``","stage","learns","range","before","enabling","quantization",".","``","calib","``","stage","runs","calibration","Args",":","quant_desc",":","An","instance","of",":","func",":","`","QuantDescriptor","<","csrc.pytorch.pytorch_quantization.tensor_quant.QuantDescriptor",">","`",".","disabled",":","A","boolean",".","If","True",",","by","pass","the","whole","module","returns","input",".","Default","False",".","if_quant",":","A","boolean",".","If","True",",","run","main","quantization","body",".","Default","True",".","if_clip",":","A","boolean",".","If","True",",","clip","before","quantization","and","learn","amax",".","Default","False",".","if_calib",":","A","boolean",".","If","True",",","run","calibration",".","Not","implemented","yet",".","Settings","of","calibration","will","probably","go","to",":","func",":","`","QuantDescriptor","<","csrc.pytorch.pytorch_quantization.tensor_quant.QuantDescriptor",">","`",".","Raises",":","Readonly","Properties",":","-","axis",":","-","fake_quant",":","-","scale",":","-","step_size",":","Mutable","Properties",":","-","num_bits",":","-","unsigned",":","-","amax",":"]
docstr: Enable clip stage
code: def enable_clip(self):
      """Enable clip stage"""
      # logger.warning("Enable `clip` stage for amax learning.")
      if not self._learn_amax:
          # raise ValueError("learn_amax is False. Cannot enable clip.")
          return
      # self.clip.clip_value_min.required_grad = True
      if hasattr(self.clip, "clip_value_max"):
          self.clip.clip_value_max.required_grad = True
      self._if_clip = True
  
imports: import math
  import logging
  import torch
  from torch import nn
  from csrc.pytorch.pytorch_quantization.tensor_quant import QuantDescriptor, tensor_quant, fake_tensor_quant
  from csrc.pytorch.pytorch_quantization.nn.modules.clip import Clip
  from csrc.pytorch.pytorch_quantization import calib
  import csrc.pytorch.pytorch_quantization.utils
label_desc: Use image node_id 13 for calling the TensorQuantizer obj's underlying member method code with example usage: obj.enable_clip() without return types