MCPcopy
hub / github.com/OpenPPL/ppq / __init__

Method __init__

ppq/IR/quantize.py:46–66  ·  view source on GitHub ↗
(
        self,
        convert_from: Operation,
        quantize_config: OperationQuantizationConfig,
        platform: TargetPlatform
    )

Source from the content-addressed store, hash-verified

44 Operation (_type_): _description_
45 """
46 def __init__(
47 self,
48 convert_from: Operation,
49 quantize_config: OperationQuantizationConfig,
50 platform: TargetPlatform
51 ):
52
53 # Simply copy all attributes from fp32 operation
54 # inputs, outputs will be created by QuantableGraph
55 super().__init__(
56 op_type = convert_from.type,
57 inputs = convert_from.inputs.copy(),
58 outputs = convert_from.outputs.copy(),
59 attributes = convert_from.attributes,
60 name = convert_from.name,
61 platform = platform,
62 opset = convert_from.opset
63 )
64
65 self._config = quantize_config
66 self._dequantized = False
67
68 @ property
69 def config(self) -> OperationQuantizationConfig:

Callers

nothing calls this directly

Calls 2

__init__Method · 0.45
copyMethod · 0.45

Tested by

no test coverage detected