brevitas icon indicating copy to clipboard operation
brevitas copied to clipboard

bit_width=4 is not in class definition

Open ardeal opened this issue 3 years ago • 0 comments
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)



ardeal avatar Sep 23 '22 08:09 ardeal