I see you define some rules to align scale settings and batch rename module(from torch.nn. to quant_nn.), very good design !
Now if I donot modify the forward code, I try to use torch.fx to replace [operator.add, torch.add, "add"] (as call_function) to call_module (I custom a nn.module which include residual_quantizer
self.residual_quantizer = quant_nn.TensorQuantizer(quant_nn.QuantConv2d.default_quant_desc_input)
)
How to auto insert qdq in shortcut branch of network with residual structure,
Can you give me some advice or other method, Ths ?
I see you define some rules to align scale settings and batch rename module(from torch.nn. to quant_nn.), very good design !
Now if I donot modify the forward code, I try to use torch.fx to replace [operator.add, torch.add, "add"] (as call_function) to call_module (I custom a nn.module which include
residual_quantizer
self.residual_quantizer = quant_nn.TensorQuantizer(quant_nn.QuantConv2d.default_quant_desc_input) )How to auto insert qdq in shortcut branch of network with residual structure, Can you give me some advice or other method, Ths ?