NVIDIA-AI-IOT / yolo_deepstream

yolo model qat and deploy with deepstream&tensorrt
Apache License 2.0
549 stars 139 forks source link

How to auto insert qdq in shortcut branch of network with residual structure ? #38

Closed lix19937 closed 1 year ago

lix19937 commented 1 year ago

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 ?

wanghr323 commented 1 year ago

We will working on this feature if we got a chance.

lix19937 commented 1 year ago

Thanks, Now I have solve it, closed