(cls, variable: Variable, config: TensorQuantizationConfig)
| 29 | |
| 30 | @ classmethod |
| 31 | def build_observer(cls, variable: Variable, config: TensorQuantizationConfig) -> BaseTensorObserver: |
| 32 | algorithm = str(config.observer_algorithm.lower()) |
| 33 | if algorithm not in OBSERVER_TABLE: |
| 34 | raise ValueError( |
| 35 | f'Observer type not understand, Except one of {OBSERVER_TABLE.keys()}, '\ |
| 36 | f'while {str(algorithm)} was given.') |
| 37 | return OBSERVER_TABLE[algorithm](watch_on=variable, quant_cfg=config) |
| 38 | |
| 39 | |
| 40 | class CalibrationHook(QuantOPRuntimeHook): |
no outgoing calls
no test coverage detected