@@ -41,14 +41,19 @@ def default_op_filter(op):
4141
4242class FixedPointQuantizeParamsFromDict (Transformation ):
4343 """
44- Quantize model parameters to a given fixed-point representation.
45- The self.max_err dictionary stores the maximum error for each quantized input after calling.
46- Parameters:
47- fixedpt_dict: Dictionary containing tensor names and their corresponding target fixed-point
48- data type or its canonical name
49- rounding_mode: Rounding mode used for conversion into fixed point.
50- Default is "ROUND",
51- possible values: ["ROUND", "HALF_EVEN", "CEIL", "FLOOR", "UP", "DOWN", "HALF_UP", "HALF_DOWN"]
44+ Quantize model parameters to a given fixed-point representation.
45+ The self.max_err dictionary stores the maximum error for each quantized input after calling.
46+ Parameters:
47+ fixedpt_dict: Dictionary containing tensor names and their corresponding target fixed-point
48+ <<<<<<< HEAD
49+ data type or its canonical name
50+ =======
51+ data type or its canonical name
52+ >>>>>>> 7dfc4b8 ([Lint] rerun linter, fix errors)
53+ rounding_mode: Rounding mode used for conversion into fixed point.
54+ Default is "ROUND",
55+ possible values: ["ROUND", "HALF_EVEN", "CEIL", "FLOOR", "UP", "DOWN",
56+ "HALF_UP", "HALF_DOWN"]
5257 """
5358
5459 def __init__ (self , fixedpt_dict , rounding_mode = "ROUND" ):
@@ -66,7 +71,7 @@ def apply(self, model: ModelWrapper):
6671 if current_dtype .is_fixed_point ():
6772 warn (
6873 f"Tensor { tname } is already a { current_dtype .get_canonical_name ()} type. "
69- f "Recasting to { tdtype .get_canonical_name ()} "
74+ "Recasting to {tdtype.get_canonical_name()}"
7075 )
7176
7277 in1_t_new = self .round_func (in1_t .astype (np .float32 ) / tdtype .scale_factor ()) * tdtype .scale_factor ()
0 commit comments