Commit Graph

23 Commits (1c0da58daec417b42a4b5b57b59073fac3026589)

Author SHA1 Message Date
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