class_docstr: INC Custom strategy definition
class_docstr_tok: ["INC","Custom","strategy","definition"]
docstr: Generating quantized model based on configuration and capturing intermediate tensors
docstr_tok: ["Generating","quantized","model","based","on","configuration","and","capturing","intermediate","tensors"]
code: def get_qtensors(self, quant_cfg, node_list):
      """
      Generating quantized model based on configuration and capturing intermediate tensors
      """
      qmodel = self.adaptor.quantize(
          quant_cfg, self.model, self.calib_dataloader
      )
      tensors = self.adaptor.inspect_tensor(
          qmodel, self.calib_dataloader, node_list, [1]
      )  # 1 is a batch index
      return tensors["activation"][0]
  
file_path: gluon-nlp/scripts/question_answering/custom_strategy.py
imports: import copy
  import numpy
  from collections import OrderedDict
  from neural_compressor.strategy.strategy import TuneStrategy, strategy_registry
label_desc: Use image node_id 2 for calling the MyCustomTuneStrategy obj's underlying member method code with example usage: obj.get_qtensors(quant_cfg, node_list) and returns: tensors