XiaotongLu
0b24276158
[Feature] Add DMCP and fix the deploy pipeline of NAS algorithms ( #406 )
...
* Copybook
* Newly created copy PR
* Newly created copy PR
* update op_counters
* update subnet/commit/FLOPsCounter
* update docs/UT
* update docs/UT
* add setter for current_mask
* replace current_mask with activated_tensor_channel
* update subnet training
* fix ci
* fix ci
* fix ci
* fix readme.md
* fix readme.md
* update
* fix expression
* fix CI
* fix UT
* fix ci
* fix arch YAMLs
* fix yapf
* revise mmcv version<=2.0.0rc3
* fix build.yaml
* Rollback mmdet to v3.0.0rc5
* Rollback mmdet to v3.0.0rc5
* Rollback mmseg to v1.0.0rc4
* remove search_groups in mutator
* revert env change
* update usage of sub_model
* fix UT
* fix bignas config
* fix UT for dcff & registry
* update Ut&channel_mutator
* fix test_channel_mutator
* fix Ut
* fix bug for load dcffnet
* update nas config
* update nas config
* fix api in evolution_search_loop
* update evolu_search_loop
* fix metric_predictor
* update url
* fix a0 fine_grained
* fix subnet export misskey
* fix ofa yaml
* fix lint
* fix comments
* add autoformer cfg
* update readme
* update supernet link
* fix sub_model configs
* update subnet inference readme
* fix lint
* fix lint
* Update autoformer_subnet_8xb256_in1k.py
* update test.py to support args.checkpoint as none
* update DARTS readme
* update readme
---------
Co-authored-by: gaoyang07 <1546308416@qq.com>
Co-authored-by: aptsunny <aptsunny@tongji.edu.cn>
Co-authored-by: sunyue1 <sunyue1@sensetime.com>
Co-authored-by: aptsunny <36404164+aptsunny@users.noreply.github.com>
Co-authored-by: wang shiguang <xiaohu_wyyx@163.com>
2023-03-02 18:22:20 +08:00
Yang Gao
42e8de73af
[Improvement] Adapt OFA series with SearchableMobileNetV3 ( #385 )
...
* fix mutable bug in AttentiveMobileNetV3
* remove unness code
* update ATTENTIVE_SUBNET_A0-A6.yaml with optimized names
* unify the sampling usage in sandwich_rule-based NAS
* use alias to export subnet
* update OFA configs
* fix attr bug
* fix comments
* update convert_supernet2subnet.py
* correct the way to dump DerivedMutable
* fix convert index bug
* update OFA configs & models
* fix dynamic2static
* generalize convert_ofa_ckpt.py
* update input_resizer
* update README.md
* fix ut
* update export_fix_subnet
* update _dynamic_to_static
* update fix_subnet UT & minor fix bugs
* fix ut
* add new autoaug compared to attentivenas
* clean
* fix act
* fix act_cfg
* update fix_subnet
* fix lint
* add docstring
Co-authored-by: gaoyang07 <1546308416@qq.com>
Co-authored-by: aptsunny <aptsunny@tongji.edu.cn>
2022-12-15 22:19:55 +08:00
qiufeng
b0b3fbdb49
[Feature] Add BigNAS algorithm ( #219 )
...
* add calibrate-bn-statistics
* add test calibrate-bn-statistics
* fix mixins
* fix mixins
* fix mixin tests
* remove slimmable channel mutable and refactor dynamic op
* refact dynamic batch norm
* add progressive dynamic conv2d
* add center crop dynamic conv2d
* refactor dynamic directory
* refactor dynamic sequential
* rename length to depth in dynamic sequential
* add test for derived mutable
* refactor dynamic op
* refactor api of dynamic op
* add derive mutable mixin
* addbignas algorithm
* refactor bignas structure
* add input resizer
* add input resizer to bignas
* move input resizer from algorithm into classifier
* remove compnents
* add attentive mobilenet
* delete json file
* nearly(less 0.2) align inference accuracy with gml
* move mutate seperated in bignas mobilenet backbone
* add zero_init_residual
* add set_dropout
* set dropout in bignas algorithm
* fix registry
* add subnet yaml and nearly align inference accuracy with gml
* add rsb config for bignas
* remove base in config
* add gml bignas config
* convert to iter based
* bignas forward and backward fly
* fix merge conflict
* fix dynamicseq bug
* fix bug and refactor bignas
* arrange configs of bignas
* fix typo
* refactor attentive_mobilenet
* fix channel mismatch due to registion of DerivedMutable
* update bignas & fix se channel mismatch
* add AutoAugmentV2 & remove unness configs
* fix lint
* recover channel assertion in channel unit
* fix a group bug
* fix comments
* add docstring
* add norm in dynamic_embed
* fix search loop & other minor changes
* fix se expansion
* minor change
* add ut for bignas & attentive_mobilenet
* fix ut
* update bignas readme
* rm unness ut & supplement get_placeholder
* fix lint
* fix ut
* add subnet deployment in downstream tasks.
* minor change
* update ofa backbone
* minor fix
* Continued improvements of searchable backbone
* minor change
* drop ratio in backbone
* fix comments
* fix ci test
* fix test
* add dynamic shortcut UT
* modify strategy to fit bignas
* fix test
* fix bug in neck
* fix error
* fix error
* fix yaml
* save subnet ckpt
* merge autoslim_val/test_loop into subnet_val_loop
* move calibrate_bn_mixin to utils
* fix bugs and add docstring
* clean code
* fix register bug
* clean code
* update
Co-authored-by: wangshiguang <wangshiguang@sensetime.com>
Co-authored-by: gaoyang07 <1546308416@qq.com>
Co-authored-by: aptsunny <aptsunny@tongji.edu.cn>
Co-authored-by: sunyue1 <sunyue1@sensetime.com>
2022-12-07 11:28:10 +08:00
Yang Gao
18fc50f7bc
[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>
2022-11-14 17:09:32 +08:00
Yue Sun
fb42405af8
[Feature] Add Autoformer algorithm ( #315 )
...
* update candidates
* update subnet_sampler_loop
* update candidate
* add readme
* rename variable
* rename variable
* clean
* update
* add doc string
* Revert "[Improvement] Support for candidate multiple dimensional search constraints."
* [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
* [Feature] Autoformer architecture and dynamicOPs (#327 )
* add DynamicSequential
* dynamiclayernorm
* add dynamic_pathchembed
* add DynamicMultiheadAttention and DynamicRelativePosition2D
* add channel-level dynamicOP
* add autoformer algo
* clean notes
* adapt channel_mutator
* vit fly
* fix import
* mutable init
* remove annotation
* add DynamicInputResizer
* add unittest for mutables
* add OneShotMutableChannelUnit_VIT
* clean code
* reset unit for vit
* remove attr
* add autoformer backbone UT
* add valuemutator UT
* clean code
* add autoformer algo UT
* update classifier UT
* fix test error
* ignore
* make lint
* update
* fix lint
* mutable_attrs
* fix test
* fix error
* remove DynamicInputResizer
* fix test ci
* remove InputResizer
* rename variables
* modify type
* Continued improvements of ChannelUnit
* fix lint
* fix lint
* remove OneShotMutableChannelUnit
* adjust derived type
* combination mixins
* clean code
* fix sample subnet
* search loop fly
* more annotations
* avoid counter warning and modify batch_augment cfg by gy
* restore
* source_value_mutables restriction
* simply arch_setting api
* update
* clean
* fix ut
2022-11-14 13:01:04 +08:00
Yang Gao
4e80037393
[Improvement] Update estimator with api revision ( #277 )
...
* update estimator usage and fix bugs
* refactor api of estimator & add inner check methods
* fix docstrings
* update search loop and config
* fix lint
* update unittest
* decouple mmdet dependency and fix lint
Co-authored-by: humu789 <humu@pjlab.org.cn>
2022-09-14 20:39:49 +08:00
humu789
57bf6fa30e
Update search configs ( #269 )
...
* update score_key
* search_debug
* add search config & fix _check_constraints
* fix ut
2022-09-01 00:13:01 +08:00
Yang Gao
4b3f8ab69e
[Feature] Refactor Estimator for computing FLOPs/Params/Latency. ( #230 )
...
* Refactor ModelEstimator:
1. add EvaluatorLoop in engine.runners;
2. add estimator for structures (both subnet & supernet);
3. add layer_counter for each op.
* fix lint
* update estimator:
1. add ResourceEstimator based on BaseEstimator;
2. add notes & examples for ResourceEstimator & EvaluatorLoop usage;
3. fix a bug of latency test.
4. minor changes according to comments.
* add UT & fix a bug caused by UT
* add docstrings & remove old estimator
* update docstrings for op_spec_counters
* rename resource_evaluator_val_loop
* support adding resource attrs of each submodule in a measured model
* fix lint
* refactor estimator file structures
* support estimating resources for spec modules
* rm old UT
* update new estimator UT cases
* fix traversal range of the model
* cancel unit convert in accumulate_sub_module_flops_params
* use estimator_cfg to build ResourceEstimator
* fix a broadcast bug
* delete fixed input_shape
* add assertion and string-format-return when measuring spec_modules
* add UT for estimating spec_modules
2022-08-23 15:01:47 +08:00
qiufeng
d190037a5e
[Feature] Add dynamic bricks ( #228 )
...
* add dynamic bricks
* add dynamic conv2d test
* add tests for dynamic linear and dynamic norm
* add docstring for dynamic conv2d
* add docstring for dynamic linear
* add docstring for dynamic batchnorm
* Refactor the dynamic op ( put more logic into the mixin )
* fix UT
* Fix UT ( fileio was moved to mmengine)
* derived mutable adds choices property
* Unify the register interface of mutable in dynamic op
* Unified getter interface of mutable in dynamic op
Co-authored-by: gaojianfei <gaojianfei@sensetime.com>
Co-authored-by: pppppM <gjf_mail@126.com>
2022-08-19 15:15:38 +08:00
pppppM
2c640d0586
Reorganize Dirs ( #205 )
...
* reorg dirs
* rename deliver to delivery
2022-07-25 13:28:08 +08:00
pppppM
ae205ac0c6
Refactor darts ( #204 )
...
* add separate optim wrapper
* refactor darts related modules
* refactor darts algorithm
* fix some bugs
* update darts related modules
* update unittest
* update darts configs
2022-07-25 09:52:39 +08:00
qiufeng
5ddfed5040
[Feature] Add slimmable algorithm
2022-07-15 23:05:07 +08:00
humu789
1e3f8e9f67
Refactor EvolutionSearcher
2022-07-15 23:04:38 +08:00