brevitas
brevitas copied to clipboard
bit_width=4 is not in class definition
trafficstars
Hi,
For the following code, we defined qnn.QuantIdentity with input parameter bit_width=4, but in there is not bit_width in QuantIdentity class.
My questions are: how will the bit_width=4 passed to quantization function? where does the quantization happen in the Brevitas code?
self.quant_inp = qnn.QuantIdentity(bit_width=4, return_quant_tensor=True)
class QuantIdentity(QuantNLAL):
def __init__(
self,
act_quant: Optional[ActQuantType] = Int8ActPerTensorFloat,
return_quant_tensor: bool = False,
**kwargs):
QuantNLAL.__init__(
self,
input_quant=None,
act_impl=None,
passthrough_act=True,
act_quant=act_quant,
return_quant_tensor=return_quant_tensor,
**kwargs)