Exemple #1
0
 def quant_output_bit_width(module: QuantLayerMixin):
     bit_width = module.quant_output_bit_width()
     return DPUQuantLayerHandler.validate_8b_bit_width(bit_width)
Exemple #2
0
 def quant_output_bit_width(cls, module: QuantLayerMixin):
     bit_width = module.quant_output_bit_width()
     return cls.validate_8b_bit_width(bit_width)
Exemple #3
0
 def quant_output_scale(module: QuantLayerMixin):
     scale = module.quant_output_scale()
     return DPUQuantLayerHandler.neg_scalar_exponent_from_scale(scale)
Exemple #4
0
 def quant_output_scale(cls, module: QuantLayerMixin):
     scale = module.quant_output_scale()
     return cls.validate_neg_scalar_int_exponent(scale)