Commit Graph

55 Commits (df50d0a5a3a6021298902ea20512a54b62bb566f)

Author SHA1 Message Date
Tingquan Gao f91811dab9 Revert "use decorator to parse batch"
This reverts commit 97935164fe.
2023-03-14 16:47:13 +08:00
Tingquan Gao aa52682c55 Revert "rm amp code from train and eval & use decorator for amp training"
This reverts commit d3941dc1e9.
2023-03-14 16:47:13 +08:00
gaotingquan d3941dc1e9 rm amp code from train and eval & use decorator for amp training 2023-03-10 16:56:55 +08:00
gaotingquan 97935164fe use decorator to parse batch 2023-03-10 16:56:55 +08:00
gaotingquan d4d3d01384 support re_parameterize 2023-01-06 20:29:07 +08:00
gaotingquan f82871b1f8 add copyright & reference 2023-01-06 20:29:07 +08:00
gaotingquan 963dcb9cac support dbb module for ResNet
1. add DiverseBranchBlock module;
2. ResNet support dbb version using DiverseBranchBlock by setting micro_block="DiverseBranchBlock";
3. ResNet support official vb version by setting use_first_short_conv=False;
4. add ResNet18_dbb training config ResNet18_dbb.yaml.
2023-01-06 20:29:07 +08:00
gaotingquan a623851224 fix: defer update_res() calling until after the object's __init__ has completed execution 2022-10-26 16:19:06 +08:00
gaotingquan 316479d380 fix: add *args, **kwargs to init_net()
the argument may be "infer_add_softmax" used in exporting.
2022-10-26 16:19:06 +08:00
gaotingquan b3ab418e80 refactor: mv the init_res of net to super().__init__()
Put the calling of update_res(), stop_after(), freeze_befor() to the construction method of the parent class. And the init_net() support to call stop_after() by config of Arch.
2022-09-28 20:13:19 +08:00
gaotingquan 7513c0b52f feat: support freeeze subnet
freeze subnet specified with the specified layer name by setting OutputTensor.stop_gradient=True
2022-09-28 20:13:19 +08:00
gaotingquan a75dc8c993 fix: fix the error that containers nesting cannot be handled.
the error would be raised when when the pattern string represents nested, e.g., containing "[3][1]".
2022-08-24 19:09:42 +08:00
root 2a909c306a fix: change to relative import 2022-08-19 11:40:38 +08:00
WangChen0902 7595ba6d70
add AFD (#1683)
* add AFD
2022-02-28 19:11:50 +08:00
gaotingquan 6963c25804 fix: fix bug
bug is that error rasied by calling update_res() when sublayer does not have _save_sub_res_hook() because nn.Sequential and nn.LayerList is not TheseusLayer.
2022-01-14 14:58:28 +08:00
gaotingquan 43fce425ac fix: change the returned result from dict to list 2022-01-14 14:58:28 +08:00
gaotingquan 3b9f629220 feat: support specify return_stages to update_res() 2022-01-14 14:58:28 +08:00
gaotingquan 71cb728b07 fix: rename to upgrade_sublayer() 2021-12-28 15:24:50 +08:00
gaotingquan a86c4b290e add license 2021-12-28 15:24:50 +08:00
gaotingquan 721ac0bf61 refactor: simplify code
1. remove WrapLayer and wrap_theseus;
2. support call update_res() one more;
3. optim parse_pattern_str() to return list of layer parsed.
2021-12-28 15:24:50 +08:00
gaotingquan 56911b573b refactor: rename replace_sub() func to ? 2021-12-28 15:24:50 +08:00
gaotingquan 0f126b75da refactor: strengthen parse_pattern_str() func 2021-12-28 15:24:50 +08:00
gaotingquan 8d0b0d4b0a refactor: extract _parse_pattern_str() func 2021-12-28 15:24:50 +08:00
gaotingquan 18dec0744a fix: fix problems commented in reviewing 2021-12-28 15:24:50 +08:00
gaotingquan 41296972a4 fix: fix comments 2021-12-28 15:24:50 +08:00
gaotingquan f8ee6c0f86 fix: fix result returned by stop_after 2021-12-28 15:24:50 +08:00
gaotingquan cf205e1379 fix: fix result returned by _find_layers_handle 2021-12-28 15:24:50 +08:00
gaotingquan b0ae3a1210 fix: unify the pattern of layer's name 2021-12-28 15:24:50 +08:00
weishengyu 6c5d1ebc28 add pruner and quanter for theseus 2021-12-09 14:51:40 +08:00
Wei Shengyu 3c148cb56a
update return res method and fix amp bug (#1309)
* fix amp bug; update return res method

* support index for list object for return res
2021-10-15 18:25:50 +08:00
weishengyu e916259508 update return_res method 2021-09-15 11:03:46 +08:00
weishengyu 5131956d15 dbg theseus 2021-09-06 16:18:57 +08:00
weishengyu 98f38fa0f7 dbg 2021-08-08 17:53:06 +08:00
weishengyu f41b09ef7f dbg 2021-08-08 17:28:57 +08:00
weishengyu 88a72b6735 dbg 2021-08-08 15:56:57 +08:00
weishengyu 2cb3bf66dd update wrap theseus rule 2021-08-08 15:55:34 +08:00
weishengyu 1985075550 dbg 2021-08-08 15:18:28 +08:00
weishengyu ef13f8c640 modify code 2021-08-08 15:04:26 +08:00
weishengyu 6dbbf8cc17 add theseus wrapper 2021-08-08 14:57:29 +08:00
weishengyu 4f8552aa4f dbg 2021-08-08 14:32:45 +08:00
weishengyu 132ec21fba reverse res_dict 2021-08-08 14:27:43 +08:00
weishengyu 56c513fdc7 remove disconnect 2021-08-08 13:29:30 +08:00
weishengyu 7e1aa2d358 dbg 2021-08-08 12:58:31 +08:00
weishengyu 6ebe7f09ed add return_inter flag 2021-08-08 01:52:18 +08:00
weishengyu 9790cc517f add return_dict to trainer 2021-08-08 01:49:26 +08:00
weishengyu bba9e0dfff add vgg theseus funcs 2021-08-08 01:07:49 +08:00
weishengyu 8c1515b5db add hook 2021-08-08 00:37:53 +08:00
weishengyu 0040a973eb add save res back 2021-08-07 23:00:32 +08:00
weishengyu e11cc5c8c1 remove useless comments 2021-06-16 22:13:32 +08:00
dongshuilong 76fcde59af add variant model example 2021-06-04 10:19:01 +08:00