Commit 403a0711 authored by Andrew Or's avatar Andrew Or Committed by Facebook GitHub Bot
Browse files

Fix test failures caused by D37088095

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

D37088095 made BC breaking changes in PyTorch, but missed
fixing a few callsites.

Reviewed By: jerryzh168

Differential Revision: D37223157

fbshipit-source-id: 5ca806253f880c49f77ce583fac5b3407eb422b1
parent 521b3cad
...@@ -215,7 +215,7 @@ def _fx_quant_prepare(self, cfg): ...@@ -215,7 +215,7 @@ def _fx_quant_prepare(self, cfg):
self.backbone, self.backbone,
qconfig, qconfig,
example_inputs, example_inputs,
prepare_custom_config_dict={ prepare_custom_config={
"preserved_attributes": ["size_divisibility", "padding_constraints"], "preserved_attributes": ["size_divisibility", "padding_constraints"],
# keep the output of backbone quantized, to avoid # keep the output of backbone quantized, to avoid
# redundant dequant # redundant dequant
...@@ -229,7 +229,7 @@ def _fx_quant_prepare(self, cfg): ...@@ -229,7 +229,7 @@ def _fx_quant_prepare(self, cfg):
self.proposal_generator.rpn_head.rpn_feature, self.proposal_generator.rpn_head.rpn_feature,
qconfig, qconfig,
example_inputs, example_inputs,
prepare_custom_config_dict={ prepare_custom_config={
# rpn_feature expecting quantized input, this is used to avoid redundant # rpn_feature expecting quantized input, this is used to avoid redundant
# quant # quant
"input_quantized_idxs": [0] "input_quantized_idxs": [0]
...@@ -249,7 +249,7 @@ def _fx_quant_prepare(self, cfg): ...@@ -249,7 +249,7 @@ def _fx_quant_prepare(self, cfg):
self.roi_heads.box_head.roi_box_conv, self.roi_heads.box_head.roi_box_conv,
qconfig, qconfig,
example_inputs, example_inputs,
prepare_custom_config_dict={ prepare_custom_config={
"output_quantized_idxs": [0], "output_quantized_idxs": [0],
}, },
) )
...@@ -257,19 +257,19 @@ def _fx_quant_prepare(self, cfg): ...@@ -257,19 +257,19 @@ def _fx_quant_prepare(self, cfg):
self.roi_heads.box_head.avgpool, self.roi_heads.box_head.avgpool,
qconfig, qconfig,
example_inputs, example_inputs,
prepare_custom_config_dict={"input_quantized_idxs": [0]}, prepare_custom_config={"input_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,
qconfig, qconfig,
example_inputs, example_inputs,
prepare_custom_config_dict={"input_quantized_idxs": [0]}, prepare_custom_config={"input_quantized_idxs": [0]},
) )
self.roi_heads.box_predictor.bbox_pred = prep_fn( self.roi_heads.box_predictor.bbox_pred = prep_fn(
self.roi_heads.box_predictor.bbox_pred, self.roi_heads.box_predictor.bbox_pred,
qconfig, qconfig,
example_inputs, example_inputs,
prepare_custom_config_dict={"input_quantized_idxs": [0]}, prepare_custom_config={"input_quantized_idxs": [0]},
) )
......
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