图片解析应用
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
571 B

  1. from .base_operator import QuantOperatorBase
  2. # Use the quantized tensor as input without DQ.
  3. class QArgMax(QuantOperatorBase):
  4. def __init__(self, onnx_quantizer, onnx_node):
  5. super().__init__(onnx_quantizer, onnx_node)
  6. def quantize(self):
  7. node = self.node
  8. quantized_input_value = self.quantizer.find_quantized_value(node.input[0])
  9. if quantized_input_value is None:
  10. self.quantizer.new_nodes += [node]
  11. return
  12. node.input[0] = quantized_input_value.q_name
  13. self.quantizer.new_nodes += [node]