Skip to content

Commit 706f99b

Browse files
authored
Improve MaskRCNN SwinT NNCF (#3929)
* ignore heads and disable smooth quant * add activations_range_estimator_params * update changelog
1 parent 929132d commit 706f99b

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,8 @@ All notable changes to this project will be documented in this file.
189189
(<https://github.com/openvinotoolkit/training_extensions/pull/3684>)
190190
- Fix MaskRCNN SwinT NNCF Accuracy Drop
191191
(<https://github.com/openvinotoolkit/training_extensions/pull/3685>)
192+
- Fix MaskRCNN SwinT NNCF Accuracy Drop By Adding More PTQ Configs
193+
(<https://github.com/openvinotoolkit/training_extensions/pull/3929>)
192194

193195
### Known issues
194196

src/otx/algo/instance_segmentation/maskrcnn.py

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -675,4 +675,25 @@ def _build_model(self, num_classes: int) -> TwoStageDetector:
675675
@property
676676
def _optimization_config(self) -> dict[str, Any]:
677677
"""PTQ config for MaskRCNN-SwinT."""
678-
return {"model_type": "transformer"}
678+
return {
679+
"model_type": "transformer",
680+
"ignored_scope": {
681+
"patterns": [".*head.*"],
682+
"validate": False,
683+
},
684+
"advanced_parameters": {
685+
"smooth_quant_alpha": -1,
686+
"activations_range_estimator_params": {
687+
"min": {
688+
"statistics_type": "QUANTILE",
689+
"aggregator_type": "MIN",
690+
"quantile_outlier_prob": "1e-4",
691+
},
692+
"max": {
693+
"statistics_type": "QUANTILE",
694+
"aggregator_type": "MAX",
695+
"quantile_outlier_prob": "1e-4",
696+
},
697+
},
698+
},
699+
}

0 commit comments

Comments
 (0)