-
Notifications
You must be signed in to change notification settings - Fork 231
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Feature] Add performance predictor (#306)
* add predictor with 4 handlers * [Improvement] Update Candidate with multi-dim search constraints. (#322) * update doc * add support type * clean code * update candidates * clean * xx * set_resource -> set_score * fix ci bug * py36 lint * fix bug * fix check constrain * py36 ci * redesign candidate * fix pre-commit * update cfg * add build_resource_estimator * fix ci bug * remove runner.epoch in testcase * update metric_predictor: 1. update MetricPredictor; 2. add predictor config for searching; 3. add predictor in evolution_search_loop. * add UT for predictor * add MLPHandler * patch optional.txt for predictors * patch test_evolution_search_loop * refactor apis of predictor and handlers * fix ut and remove predictor_cfg in predictor * adapt new mutable & mutator design * fix ut * remove unness assert after rebase * move predictor-build in __init__ & simplify estimator-build Co-authored-by: Yue Sun <aptsunny@tongji.edu.cn>
- Loading branch information
Showing
17 changed files
with
1,190 additions
and
117 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
configs/nas/mmcls/spos/spos_shufflenet_search_predictor_8xb128_in1k.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
_base_ = ['./spos_shufflenet_supernet_8xb128_in1k.py'] | ||
|
||
model = dict(norm_training=True) | ||
|
||
train_cfg = dict( | ||
_delete_=True, | ||
type='mmrazor.EvolutionSearchLoop', | ||
dataloader=_base_.val_dataloader, | ||
evaluator=_base_.val_evaluator, | ||
max_epochs=20, | ||
num_candidates=50, | ||
top_k=10, | ||
num_mutation=25, | ||
num_crossover=25, | ||
mutate_prob=0.1, | ||
constraints_range=dict(flops=(0., 360.)), | ||
predictor_cfg=dict( | ||
type='mmrazor.MetricPredictor', | ||
train_samples=20, | ||
handler_cfg=dict(type='mmrazor.GaussProcessHandler')), | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Copyright (c) OpenMMLab. All rights reserved. | ||
from .metric_predictor import MetricPredictor | ||
|
||
__all__ = ['MetricPredictor'] |
Oops, something went wrong.