Commit Graph

37 Commits (86c61539b10bdec8c58a154b4b4dfb7520bb3d91)

Author SHA1 Message Date
LKJacky 5eaa22574d
[Doc] add documents about pruning. (#313)
* init

* update user guide

* update images

* update

* update How to prune your model

* update how_to_use_config_tool_of_pruning.md

* update doc

* move location

* update

* update

* update

* add mutablechannels.md

* add references

Co-authored-by: liukai <liukai@pjlab.org.cn>
Co-authored-by: jacky <jacky@xx.com>
2022-10-26 13:27:48 +08:00
whcao 1e8f886523
[Feature]Feature map visualization (#293)
* WIP: vis

* WIP: add visualization

* WIP: add visualization hook

* WIP: support razor visualizer

* WIP

* WIP: wrap draw_featmap

* support feature map visualization

* add a demo image for visualization

* fix typos

* change eps to 1e-6

* add pytest for visualization

* fix vis hook

* fix arguments' name

* fix img path

* support draw inference results

* add visualization doc

* fix figure url

* move files

Co-authored-by: weihan cao <HIT-cwh>
2022-10-26 13:26:20 +08:00
LKJacky f98ac3416b
fix ci (#284)
* fix ci for circle ci

* fix bug in test_metafiles

* add  pr_stage_test for github ci

* add multiple version

* fix ut

* fix lint

* Temporarily skip dataset UT

* update github ci

* add github lint ci

* install wheel

* remove timm from requirements

* install wheel when test on windows

* fix error

* fix bug

* remove github windows ci

* fix device error of arch_params when DsnasDDP

* fix CRD dataset ut

* fix scope error

* rm test_cuda in workflows of github

* [Doc] fix typos in en/usr_guides

Co-authored-by: liukai <liukai@pjlab.org.cn>
Co-authored-by: pppppM <gjf_mail@126.com>
Co-authored-by: gaoyang07 <1546308416@qq.com>
Co-authored-by: huangpengsheng <huangpengsheng@sensetime.com>
Co-authored-by: SheffieldCao <1751899@tongji.edu.cn>
2022-10-10 10:06:57 +08:00
pppppM 6d3bb47495
Bump version to 1.0.0rc0 (#268)
* add changelog

* update changelog

Co-authored-by: gaojianfei <gaojianfei@sensetime.com>
2022-09-01 12:11:07 +08:00
pppppM 41464c6af3
Regression Benchmark (#271)
* update benchmark test

* fix circle ci gpu config

* move delivery, recorder, tracer from structures to task modules

* move ops from models to models.architectures

* rename dynamic_op to dynamic_ops

* fix configs and metafiles

* remove some github ci

* fix configs / readme / metafile

Co-authored-by: gaojianfei <gaojianfei@sensetime.com>
2022-09-01 11:54:18 +08:00
humu789 93bf46881b
[Doc] Update README.md and fix docs (#270)
* fix docs

* update README.md and model_zoo

* fix lint

* update README.md

* fix lint
2022-09-01 01:15:18 +08:00
PJDong 24e106ba1d
[Doc] Optimize docs and Fix lint (#261)
* fix name of mmcv-full to mmcv

* [doc] move the location of nas/kd/pruning; fix lint errors

* optimize docs and fix pre-commit error

* [Doc&Fix] add note for installation; fix the requirements

* update docs

Co-authored-by: humu789 <humu@pjlab.org.cn>
2022-08-31 18:33:47 +08:00
pppppM 5105489d64
Revert "[Enhancement] Add benchmark test script" (#263)
Revert "[Enhancement] Add benchmark test script (#262)"

This reverts commit f60cf9c469.
2022-08-30 22:03:54 +08:00
pppppM f60cf9c469
[Enhancement] Add benchmark test script (#262)
* update benchmark test

* fix circle ci gpu config

* fix lints

Co-authored-by: gaojianfei <gaojianfei@sensetime.com>
2022-08-30 21:59:39 +08:00
PJDong c650b3eee5
[Doc] Add Tutorial of KD,Pruning,NAS and Installation. (#255)
* [doc] add doc of installation, kd, nas, pruning

* [doc] add user guide part

* fix name of mmcv-full to mmcv

* [doc] fix mmcv based on zaida 's suggestion

* [doc] fix index error based on shiguang's comments
2022-08-30 19:48:18 +08:00
humu789 ce22497b25
[Docs] Add docs and update algo README (#259)
* docs v0.1

* update picture links in algo README
2022-08-30 19:46:37 +08:00
pppppM 179bd5287d
[Fix] Adapt latest mmcv (#253)
* Adapt to the latest mmcv and mmengine

* fixed ut_subnet_sampler_loop

* fix get_model

* fix lints

Co-authored-by: humu789 <humu@pjlab.org.cn>
2022-08-29 20:34:51 +08:00
humu789 b2272eb313
[Docs] Refactor readthedocs (#252)
refactor readthedocs
2022-08-29 18:41:51 +08:00
P.Huang 5d9fcd8070
[feature] add `A Comprehensive Overhaul of Feature Distillation` (#244)
* init

* init

* linting

* add README

* add wrn docstrings

* add vanilla wrn configs

* fix UT

* OFD DONE

* update OFD readme

* update config path

* rename vanilla model files

* rename vanilla models config files

Co-authored-by: huangpengsheng <huangpengsheng@sensetime.com>
2022-08-29 14:06:58 +08:00
zhongyu zhang 1c0da58dae
[Feature] Add FBKD algorithm and torch_connectors (#248)
* 1.Add FBKD

* 1.Add torch_connector and its ut. 2.Revise readme and fbkd config.

* 1.Revise UT for torch_connectors

* 1.Revise nonlocalblock into a subclass of NonLocal2d in mmcv.cnn
2022-08-29 10:05:32 +08:00
zhongyu zhang f3b964c521
[Feature] Add DFAD algorithm (#247)
1.Add DFAD algorithm. 2.Add L1Loss and its UT.
2022-08-25 15:46:45 +08:00
zhongyu zhang 876b2ac033
[Feature] Add Zero-shot Knowledge Transfer via Adversarial Belief Matching (#241)
* 1.Add ZSKT algorithm with zskt_generator, at_loss. 2.Add teacher_detach in kl_divergence.

* 1.Amend readme. 2.Revise UT bugs of test_graph and test_distill.

* 1.Amend docstring of zskt_generator

* 1.Add torch version judgment in test_distillation_loss.

* 1.Revise defaults of batch_size to 1 in generators. 2.Revise mmcls.data to mmcls.structures

* 1.Rename function "at" to "calc_attention_matrix".
2022-08-24 14:57:35 +08:00
zhongyu zhang 57aec1f730
[Feature] Add DAFL Distillation (#235)
* 1.Add DAFL, including config, DAFLLoss and readme. 2.Add DataFreeDistillationtillation. 3.Add Generator, including base_generator and dafl_generator. 4.Add get_module_device and set_requires_grad functions in utils.

* 1.Amend the file that report error in mypy test under py37, including gather_tensors, datafree_distillation, base_generator. 2.Revise other linting error.

* 1.Revise some docstrings.

* 1.Add UT for datafreedistillation. 2.Add all typing.hints.

* 1.Add UT for generators and gather_tensors.

* 1.Add assert of batch_size in base_generator

* 1.Isort

Co-authored-by: zhangzhongyu.vendor < zhangzhongyu.vendor@sensetime.com>
2022-08-23 10:47:34 +08:00
zengyi c6e8dcd209
[Feature] Add BYOT Distillation (#232)
* byot connector & distiller

* fix config

* fix connector

* tmpsave

* add byot & kdsoftce loss

* update dev-1.x

* fx wsld

* Update README.md

* Update README.md

* fix md

* add ut & REQUIRE REVIEW part

* fix md

* add SelfDistillValLoop UT

* fix comments

* fix comments v2

* fix comments v3

* add connector_idx=None to ConfigurableDistiller.get_record()

Co-authored-by: zengyi.vendor <zengyi.vendor@sensetime.com>
2022-08-22 14:08:02 +08:00
spynccat a1937fd5a6
[Feature] Add Decoupled KD Loss (#222)
* add DKDLoss, config

* linting

* linting

* reset default reduction

* dkd ut

* Update decoupled_kd.py

* Update decoupled_kd.py

* Update decoupled_kd.py

* fix commit

* fix readme

* fix comments

* linting comment

* rename loss params

* fix docstring

* Update decoupled_kd.py

* fix gt from config

* merge fix

* fix ut & wsld

* Update README.md

* Update README.md

* add Acknowledgement

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* fix readme style

* fix md

Co-authored-by: zengyi.vendor <zengyi.vendor@sensetime.com>
2022-08-15 14:59:24 +08:00
zhongyu zhang e88e92cac4
[Feature] Add Activation Boundaries Loss (#214)
* 1.Add ABLoss and its config, readme and pipeline image. 2.Merge all connectors in general_connector into convconnector.

* 1.Improve convconnector to convmoduleconnecotr which aligns with mmcv. 2.Revise UT of test_connector. 3.Revise config of fitnet and abloss. 4.Revise mmcls import of darts_subnet_head to align with the newest mmcls-dev-1.x.

* 1.Simplify ConvModuleConncetor by ConvModule.

Co-authored-by: zhangzhongyu.vendor < zhangzhongyu.vendor@sensetime.com>
2022-08-05 14:14:47 +08:00
wilxy a94aaba986
[Feature] Add connector components and FitNet (#212)
* Fix spelling mistakes

* 1.Rename general connectors. 2.Replace nn.conv2 to build_conv_layer, replace nn.bn to build_norm_layer.

* 1. Rename function init_parameters to init_weights in SingleConvConnector to realize automatically invocation.

* 1. Add norm_cfg in config and general_connector

* 1.Move calculate_student_loss to distillation algorithm. 2.Move mmrazor.models.connector to mmrazor.models.architectures. 3.Merge stu_connectors and tea_connectors into connectors, and call connectors by their connector_name.

* 1.Replace connector_name to connector in record_info. 2.Add assert that each connector must be in connectors.

Co-authored-by: zhangzhongyu.vendor < zhangzhongyu.vendor@sensetime.com>
2022-07-28 19:17:42 +08:00
pppppM 71a196490b
[Docs] Configure Myst-parser to parse anchor tag (#164) 2022-05-31 16:22:29 +08:00
pppppM b8daedf544
[Docs] Replace markdownlint with mdformat (#163)
* markdonwlint -> mdformat

* update mmcv min and max version

* fix README_zh-CN links
2022-05-31 16:21:53 +08:00
pppppM 2dad24044d
Bump version to 0.3.1 (#155)
* [Enhance] Add extra dataloader settings in configs (#141)

* [Docs] fix md link failure in docs (#142)

* [Docs] update Cream readme

* delete 'readme.md' in model_zoo.md

* fix md link failure in docs

* [Docs] add myst_parser to extensions  in conf.py

* [Docs] delete the deprecated recommonmark

* [Docs] delete recommandmark from conf.py

* [Docs] fix md link failure and lint failture

* [Fix] Fix seed error in mmseg/train_seg.py and typos in train.md (#152)

* [Docs] update Cream readme

* delete 'readme.md' in model_zoo.md

* fix cwd docs and fix seed in #151

* delete readme of cream

* [Enhancement]Support broadcast_object_list in multi-machines & support Searcher running in single GPU (#153)

* broadcast_object_list support multi-machines

* add userwarning

* [Fix] Fix configs (#149)

* fix configs

* fix spos configs

* fix readme

* replace the official mutable_cfg with the mutable_cfg searched by ourselves

* update https prefix

Co-authored-by: pppppM <gjf_mail@126.com>

* [BUG]Support to prune models containing GroupNorm or InstanceNorm. (#144)

* suport GN and IN

* test pruner

* limit pytorch version

* fix pytest

* throw an error when tracing groupnorm with torch version under 1.6.0

Co-authored-by: caoweihan <caoweihan@sensetime.com>

* Bump version to 0.3.1

Co-authored-by: qiufeng <44188071+wutongshenqiu@users.noreply.github.com>
Co-authored-by: PJDong <1115957667@qq.com>
Co-authored-by: humu789 <88702197+humu789@users.noreply.github.com>
Co-authored-by: whcao <41630003+HIT-cwh@users.noreply.github.com>
Co-authored-by: caoweihan <caoweihan@sensetime.com>
2022-05-05 01:02:45 +08:00
pppppM 49f1bee45b
Bump version to v0.3.0 (#135)
* [Feature] Add function to meet mmdeploy support (#102)

* add init_model function for mmdeploy

* fix lint

* add unittest for init_xxx_model

* fix lint

* mv test_inference.py to test_apis directory

* [Feature] Add function to meet mmdeploy support (#102)

* add init_model function for mmdeploy

* fix lint

* add unittest for init_xxx_model

* fix lint

* mv test_inference.py to test_apis directory

* [Refactor] Delete redundant `set_random_seed` function (#104)

* refactor set_random_seed

* add unittests

* fix unittests error

* fix lint

* avoid bc breaking

* [Feature] Add diff seeds to diff ranks and set torch seed in worker_init_fn (#113)

* add init_random_seed

* Set diff seed to diff workers

* [Feature] Add multi machine dist_train (#114)

* support multi nodes

* update training doc

* fix lints

* remove fixed seed

* fix ddp wrapper registry (#128)

* [Docs] Add brief installation steps in README(_zh-CN).md (#121)

* Add brief installation

* add brief installtion ref to mmediting pr#816

Co-authored-by: caoweihan <caoweihan@sensetime.com>

* [BUG]Fix bugs in pruner (#126)

* fix bugs in pruner when pruning models with shared modules

* pruner can trace models with dilation conv2d

* fix deploy_subnet

* fix add_pruning_attrs

* fix bugs in modify_forward

* fix lint

* fix StructurePruner

* test tracing models with shared modules

Co-authored-by: caoweihan <caoweihan@sensetime.com>

* [Docs]Add some more details to docs (#133)

* add docs for dataset

* add cfg-options for distillation

* fix docs

Co-authored-by: caoweihan <caoweihan@sensetime.com>

* reset norm running status after prepare_from_supernet (#81)

* [Improvement]Sync train api (#115)

Co-authored-by: caoweihan <caoweihan@sensetime.com>

* [Feature]Support Relational Knowledge Distillation (#127)

* add rkd

* add rkd pytest

* add rkd configs

* fix readme

* fix rkd

* split rkd loss to distance-wise and angle-wise losses

* rename rkd losses

* add rkd metaflie

* add rkd related links

* rename rkd metafile and add to model index

* delete cifar100

Co-authored-by: caoweihan <caoweihan@sensetime.com>
Co-authored-by: pppppM <gjf_mail@126.com>

Co-authored-by: qiufeng <44188071+wutongshenqiu@users.noreply.github.com>
Co-authored-by: wutongshenqiu <690364065@qq.com>
Co-authored-by: whcao <41630003+HIT-cwh@users.noreply.github.com>
Co-authored-by: caoweihan <caoweihan@sensetime.com>
2022-04-02 19:30:50 +08:00
qiufeng 64ccbc03fd
[Enhance] Add setup multi-processes for all tasks (#59)
* Add setup-multi-processes for all tasks

* Add setup-multi-processes for all tasks

* Add test for setup-multi-processes
2022-01-26 19:17:55 +08:00
qiufeng 721abc4a42
[Docs] Use shared menu from theme instead (#38)
* fix share menu

* initialize zh_cn

Co-authored-by: qiufeng <qiufeng3217@gmail.com>
2022-01-12 19:58:03 +08:00
xiatao e2011d8da8
Update train.md (#22)
update train.md
2021-12-24 22:46:47 +08:00
Xiaolin Wang 532b59b9ca
fix typo (#18) 2021-12-24 16:08:20 +08:00
AllentDan edc6748658
[Docs] Fix grammar and spelling mistakes in docs (#16)
* fix docs

* fix template
2021-12-24 15:40:40 +08:00
humu789 822837cc86
[Docs] update README.md and overview.md (#7) 2021-12-23 19:30:01 +08:00
whcao be4e8ed827
[Fix]Fix readme bug (#5)
* Base Framework (#24)

* Base Framework

* [Feature] Add loss

* [Feature] Add op (#4)

* [Feature] Add mutator (#3)

* [Feature] Add mutable (#2)

* [Feature] Add architecture (#1)

* [Docs] Add Docs (#6)

* add docs

* fix known_third_party

Co-authored-by: qiufeng <qiufeng3217@gmail.com>

* update docs (#12)

Co-authored-by: qiufeng <qiufeng3217@gmail.com>

* [Docs] Add README (#10)

* add readme

* refactor readme

* add logo

* update release time

Co-authored-by: qiufeng <qiufeng3217@gmail.com>

* [Docs] Add Resources (#11)

* add resources

* fix known_third_party

* fix known_third_party

* fix known_third_party

* refactor resources

Co-authored-by: qiufeng <qiufeng3217@gmail.com>

* add pytest (#18)

Co-authored-by: caoweihan <caoweihan@sensetime.com>

* add utils (#17)

Co-authored-by: caoweihan <caoweihan@sensetime.com>

* add distillers (#16)

Co-authored-by: caoweihan <caoweihan@sensetime.com>

* add pruners (#15)

Co-authored-by: caoweihan <caoweihan@sensetime.com>

* fix bug

* update docstring (#20)

* Prepare for open source (#23)

* update MMRazor description

* update Github action

* add Mircosoft copyright

* update requirements

* fix  a bug

* fix a typo

Co-authored-by: humu789 <humu@pjlab.org.cn>
Co-authored-by: humu789 <88702197+humu789@users.noreply.github.com>
Co-authored-by: qiufeng <44188071+wutongshenqiu@users.noreply.github.com>
Co-authored-by: qiufeng <qiufeng3217@gmail.com>
Co-authored-by: whcao <41630003+HIT-cwh@users.noreply.github.com>
Co-authored-by: caoweihan <caoweihan@sensetime.com>

* fix readme and pre-commit

* rename tutorials

* fix a bug

* pass lint

Co-authored-by: pppppM <67539920+pppppM@users.noreply.github.com>
Co-authored-by: humu789 <humu@pjlab.org.cn>
Co-authored-by: humu789 <88702197+humu789@users.noreply.github.com>
Co-authored-by: qiufeng <44188071+wutongshenqiu@users.noreply.github.com>
Co-authored-by: qiufeng <qiufeng3217@gmail.com>
Co-authored-by: caoweihan <caoweihan@sensetime.com>
2021-12-23 18:25:05 +08:00
pppppM 4a01ec678e
[Fix] fix some typos (#6)
* fix typos

* refactor README

* fix lint

* fix lint
2021-12-23 18:01:52 +08:00
humu789 b53b3950ae
update docstring (#20) 2021-12-23 12:02:39 +08:00
qiufeng b04c84664b
update docs (#12)
Co-authored-by: qiufeng <qiufeng3217@gmail.com>
2021-12-23 10:35:32 +08:00
qiufeng 6daeef4170
[Docs] Add Docs (#6)
* add docs

* fix known_third_party

Co-authored-by: qiufeng <qiufeng3217@gmail.com>
2021-12-23 09:51:48 +08:00