Commit c7226783 authored by Yanghan Wang's avatar Yanghan Wang Committed by Facebook GitHub Bot
Browse files

fix FX mode rcnn avgpool output config

Summary:
Pull Request resolved: https://github.com/facebookresearch/d2go/pull/327

Fix the bug for not leaving avgpool quantized when its input is quantized. This is not captured by CI because currently we set `small_pooler_resolution` to True to make test running faster, but this skips the `avgpool` everytime.

Reviewed By: jerryzh168

Differential Revision: D37706151

fbshipit-source-id: fde9a190324a23b97ba803e000f4caa54f6f3738
parent 1f313907
...@@ -282,7 +282,10 @@ def _fx_quant_prepare(self, cfg, example_input): ...@@ -282,7 +282,10 @@ def _fx_quant_prepare(self, cfg, example_input):
self.roi_heads.box_head.avgpool, self.roi_heads.box_head.avgpool,
qconfig, qconfig,
fqn_to_example_inputs["roi_heads.box_head.avgpool"], fqn_to_example_inputs["roi_heads.box_head.avgpool"],
prepare_custom_config={"input_quantized_idxs": [0]}, prepare_custom_config={
"input_quantized_idxs": [0],
"output_quantized_idxs": [0],
},
) )
self.roi_heads.box_predictor.cls_score = prep_fn( self.roi_heads.box_predictor.cls_score = prep_fn(
self.roi_heads.box_predictor.cls_score, self.roi_heads.box_predictor.cls_score,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment