Commit Graph

122 Commits (c6e8dcd209020b1018a5f65cdf6b43253c6c6240)
 

Author SHA1 Message Date
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
LKJacky 83240dcd8a
add BaseNode/BaseGraph, ModuleNode/ModuleGraph (#217)
* add BaseNode/BaseGraph,  ModuleNode/ModuleGraph

* add docstring, redesign some functions

* add 'placeholder' after cat/bind/pass

* change type to a property from a method

* add test model s

* rename XXXNode in path to PathXXXNode

* 'xxconv' -> 'xxconv2d' in type

* ToGraph -> GraphConverter, PathToGraph -> PathToGraphConverter

* rm init_from_path_list

* convert some public methods to private methods in GraphConverter

* type -> basic_type

* fix some error

Co-authored-by: liukai <liukai@pjlab.org.cn>
2022-08-19 15:38:19 +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
whcao 8775b033b0
[Bug]Fix iterable import bug (#233)
fix iterable import bug
2022-08-18 13:41:07 +08:00
zhongyu zhang a5435d74b9
[Fix] Fix AssertionError in test_connector (#231)
fix connector UT bug
2022-08-15 14:59:58 +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
qiufeng 6e8ebfd85a
[Fix] Fix `Protocol` import error when python<3.8 (#227)
fix Protocol import error
2022-08-12 13:06:12 +08:00
qiufeng 7dca9ba7c7
[Feature] Add `DerivedMutable` & `MutableValue` (#215)
* fix lint

* complement unittest for derived mutable

* add docstring for derived mutable

* add unittest for mutable value

* fix logger error

* fix according to comments

* not dump derived mutable when export

* add warning in `export_fix_subnet`

* fix __mul__ in mutable value
2022-08-10 16:07:03 +08:00
PJDong 696191e0c0
[Refactor] Move `build_arch_param` from `DiffMutableModule` to `DiffModuleMutator` (#221)
* move build_arch_param from mutable to mutator

* fix UT of diff mutable and mutator

* modify based on shiguang's comments

* remove mutator from the unittest of mutable
2022-08-10 10:05:32 +08:00
humu789 e4305f3d0b
[Bug] Fix darts loop unittest (#218)
* fix_darts_loop

* fix darts_loop unittest
2022-08-05 17:46:05 +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
humu789 068e4bfdaa
[Fix] Fix EpochMultiDataloader in darts loop (#209)
fix_darts_loop
2022-08-01 14:51:40 +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
qiufeng 6987511e6b
[Fix] Fix mmcls import error (#206)
* fix mmcls import error

* fix __init__.py
2022-07-26 15:33:11 +08:00
PJDong 5495accd84
[Fix] Fix bugs in spos,anglenas,detnas (#202)
* fix bugs in spos,anglenas,detnas

* update metafile and subnet
2022-07-25 14:46:11 +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
pppppM cebc1aa810 Clean depercated tools 2022-07-15 23:05:10 +08:00
wutongshenqiu c6a2d482fd refactor autoslim config 2022-07-15 23:05:10 +08:00
pppppM 5bf1eca4e4 Add benchmark tools & Reorgnazie configs 2022-07-15 23:05:10 +08:00
qiufeng 5ddfed5040 [Feature] Add slimmable algorithm 2022-07-15 23:05:07 +08:00
pppppM a4c76ae47e [Refactor] Add distiller 2022-07-15 23:04:38 +08:00
PJDong 6c920c88ee Align SPOS and DetNAS to MMRazor2.0 2022-07-15 23:04:38 +08:00
humu789 2d5e8bc675 Refactor subnet sampler 2022-07-15 23:04:38 +08:00
humu789 1e3f8e9f67 Refactor EvolutionSearcher 2022-07-15 23:04:38 +08:00
humu789 7ab21f76e2 Refactor multiloader runner 2022-07-15 23:04:38 +08:00
pppppM cb238e36e3 [Feature] Add Recorder to improve Distiller 2022-07-15 23:04:38 +08:00
humu789 8913d6840d [Feature] Add KD val loop 2022-07-15 23:04:38 +08:00
whcao 6bdd9d682b [Refactor] Rename ChannelMutable to MutableChannel 2022-07-15 23:04:38 +08:00
PJDong 0939aecdb6 refactor name of mutable module 2022-07-15 23:04:38 +08:00
whcao 42063ae4d3 [Refactor]Refactor tracer and channel mutator 2022-07-15 23:04:35 +08:00
PJDong 332f49ac6f Support SubnetMixin and add Razor Registry Build Function 2022-07-15 23:04:13 +08:00
qiufeng 2d17ac6c2e [Feature] Add flops estimator 2022-07-15 23:04:13 +08:00
PJDong 20f672e76a [FIX] Fix Circular Import Error 2022-07-15 23:04:13 +08:00
whcao b1ac66a9a3 [Features]Weihan dev/delivery 2022-07-15 23:04:13 +08:00
PJDong 56afc69d85 Refactor DartsBackbone 2022-07-15 23:04:13 +08:00
pppppM 577a3a2a94 [Refactor] Base Algorithm 2022-07-15 23:04:13 +08:00
pppppM 21e2110673 Refactor Diff Mutator 2022-07-15 23:04:13 +08:00
pppppM 31b60501c9 Update registry and fix ci 2022-07-15 23:04:13 +08:00
PJDong 804a595fc6 Refactor DiffMutable, DiffOP and DiffChoiceRoute. 2022-07-15 23:04:13 +08:00
qiufeng 99e7993376 Refactor backbone 2022-07-15 23:04:13 +08:00
qiufeng 910b131183 Refactor Mutator 2022-07-15 23:04:13 +08:00
PJDong 3e4b04a02f Refactor Mutable 2022-07-15 23:04:13 +08:00
pppppM dee5352f92 [CI] Add mypy and mdformat 2022-07-15 23:04:10 +08:00
pppppM 590bfa448c [Refactor] Refactor SPOS & DetNAS interface 2022-07-15 23:02:57 +08:00
pppppM 4b5ddaf642 [Refactor] Refactor Registry 2022-07-15 23:02:57 +08:00
pppppM 2efe63e9a4 [CI] Add Gitlab CI 2022-07-15 23:02:57 +08:00
pppppM baa8c8614e [Deprecated] Clean up code that will be deprecated in OpenMMLab 2.0 2022-07-15 23:02:37 +08:00
NickYangMin 8b57a07b5e
[Bug] fix bug in find_make_group_parser for depthwise (#195)
Co-authored-by: yangmin <yangmin@microbt.com>
2022-07-08 13:49:03 +08:00
pppppM c83a0718ef
Fix darts metafile 2022-07-06 21:51:56 +08:00