Skip to content

Commit

Permalink
Merge pull request #1044 from openvinotoolkit/ad/mmseg_mmdet_updates
Browse files Browse the repository at this point in the history
Add nncf configs for segmentation models
  • Loading branch information
goodsong81 authored Jun 3, 2022
2 parents 94fcade + 082b963 commit cc11743
Show file tree
Hide file tree
Showing 8 changed files with 191 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"base": {
"find_unused_parameters": true,
"nncf_config": {
"target_metric_name": "mDice",
"input_info": {
"sample_size": [1, 3, 512, 512]
},
"compression": [],
"log_dir": "."
},
"params_config": {
"iters": 0,
"open_layers": []
},
"checkpoint_config": {
"interval": -1
}
},
"nncf_quantization": {
"optimizer": {
"lr": 1e-4
},
"lr_config": {
"fixed": null,
"fixed_iters": 0,
"warmup": null,
"warmup_iters": 0,
"step": [20]
},
"nncf_config": {
"compression": [
{
"algorithm": "quantization",
"preset": "mixed",
"initializer": {
"range": {
"num_init_samples": 500
},
"batchnorm_adaptation": {
"num_bn_adaptation_samples": 500
}
},
"ignored_scopes": [
"{re}.*cross_resolution_weighting.*__mul__.*",
"{re}.*spatial_weighting.*__mul__.*"
]
}
],
"accuracy_aware_training": {
"mode": "early_exit",
"params": {
"maximal_absolute_accuracy_degradation": 1.0,
"maximal_total_epochs": 40
}
}
}
},
"order_of_parts": [
"nncf_quantization"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ framework: OTESegmentation v0.14.0
entrypoints:
base: segmentation_tasks.apis.segmentation.OTESegmentationTrainingTask
openvino: segmentation_tasks.apis.segmentation.OpenVINOSegmentationTask
# nncf: segmentation_tasks.apis.segmentation.OTESegmentationNNCFTask
nncf: segmentation_tasks.apis.segmentation.OTESegmentationNNCFTask

# Capabilities.
capabilities:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
}
}
},
"order_of_parts": [
"order_of_parts": [
"nncf_quantization"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"base": {
"find_unused_parameters": true,
"nncf_config": {
"target_metric_name": "mDice",
"input_info": {
"sample_size": [1, 3, 512, 512]
},
"compression": [],
"log_dir": "."
},
"params_config": {
"iters": 0,
"open_layers": []
},
"checkpoint_config": {
"interval": -1
}
},
"nncf_quantization": {
"optimizer": {
"lr": 1e-4
},
"lr_config": {
"fixed": null,
"fixed_iters": 0,
"warmup": null,
"warmup_iters": 0,
"step": [20]
},
"nncf_config": {
"compression": [
{
"algorithm": "quantization",
"preset": "mixed",
"initializer": {
"range": {
"num_init_samples": 5
},
"batchnorm_adaptation": {
"num_bn_adaptation_samples": 5
}
},
"ignored_scopes": [
"{re}.*cross_resolution_weighting.*__mul__.*",
"{re}.*spatial_weighting.*__mul__.*"
]
}
],
"accuracy_aware_training": {
"mode": "early_exit",
"params": {
"maximal_absolute_accuracy_degradation": 1.0,
"maximal_total_epochs": 40
}
}
}
},
"order_of_parts": [
"nncf_quantization"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ framework: OTESegmentation v0.14.0
entrypoints:
base: segmentation_tasks.apis.segmentation.OTESegmentationTrainingTask
openvino: segmentation_tasks.apis.segmentation.OpenVINOSegmentationTask
# nncf: segmentation_tasks.apis.segmentation.OTESegmentationNNCFTask
nncf: segmentation_tasks.apis.segmentation.OTESegmentationNNCFTask

# Capabilities.
capabilities:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"base": {
"find_unused_parameters": true,
"nncf_config": {
"target_metric_name": "mDice",
"input_info": {
"sample_size": [1, 3, 512, 512]
},
"compression": [],
"log_dir": "."
},
"params_config": {
"iters": 0,
"open_layers": []
},
"checkpoint_config": {
"interval": -1
}
},
"nncf_quantization": {
"optimizer": {
"lr": 1e-4
},
"lr_config": {
"fixed": null,
"fixed_iters": 0,
"warmup": null,
"warmup_iters": 0,
"step": [20]
},
"nncf_config": {
"compression": [
{
"algorithm": "quantization",
"preset": "mixed",
"initializer": {
"range": {
"num_init_samples": 500
},
"batchnorm_adaptation": {
"num_bn_adaptation_samples": 500
}
},
"ignored_scopes": [
"{re}.*cross_resolution_weighting.*__mul__.*",
"{re}.*spatial_weighting.*__mul__.*"
]
}
],
"accuracy_aware_training": {
"mode": "early_exit",
"params": {
"maximal_absolute_accuracy_degradation": 1.0,
"maximal_total_epochs": 40
}
}
}
},
"order_of_parts": [
"nncf_quantization"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ framework: OTESegmentation v0.14.0
entrypoints:
base: segmentation_tasks.apis.segmentation.OTESegmentationTrainingTask
openvino: segmentation_tasks.apis.segmentation.OpenVINOSegmentationTask
# nncf: segmentation_tasks.apis.segmentation.OTESegmentationNNCFTask
nncf: segmentation_tasks.apis.segmentation.OTESegmentationNNCFTask

# Capabilities.
capabilities:
Expand Down

0 comments on commit cc11743

Please sign in to comment.