| 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: |