Commit Graph

370 Commits (a47451b47a1c88668c8284c885be92b5965e5447)
 

Author SHA1 Message Date
Jerry Jiarui XU a47451b47a
add more module in cnn __init__ (#381) 2020-07-03 11:49:47 +08:00
Jerry Jiarui XU 42f03d84de
Refactor plugins: move from ops to cnn (#380)
* Refator plugins: move from ops to cnn

* minior update

* minior update
2020-07-03 01:37:58 +08:00
Xiaojie Li 82211b407e
Added new features to `impad` (#377)
* update impad

* fix docstring

* add shape for impad

* fix unit test

* remove old version & fix doc

* fix linting

* fix doc

Co-authored-by: lixiaojie <lixiaojie@sensetime.com>
2020-07-02 19:34:46 +08:00
Kai Chen cab4031454
include cuda and cpp files (#379) 2020-07-02 19:18:22 +08:00
Kai Chen 3777aa8c10
Fix the version of codecov-action to v1.0.10 (#378)
* Fix the version of codecov-action to v1.0.7

* Update build.yml
2020-07-02 14:41:58 +08:00
Jerry Jiarui XU 9c51928b7c
Add tensor2imgs in misc (#374)
* add tensor2imgs in misc

* rename

* fixed import

* raise error
2020-07-02 00:14:50 +08:00
Jintao Lin 1ebd7ea6fb
add unittest for set_random_seed (#376) 2020-07-02 00:13:04 +08:00
Jerry Jiarui XU 0970ae94c2
Add cpu ops (#370)
* update actiion

* remove 1.3 cuda

* reorder

* add no torch

* fixed version

* make py3.8 on pt1.5

* make py3.8 on pt1.5

* remove torch 1.3

* disable py3.8

* pip

* merge master with cuda compile fix

* add cpu roi align

* fixed test

* fixed no torch

* add CUDA_ARGS

* use one line

* gencode=61

* seperate jobs

* update lint

* use parametrize test

* formart and rename

* unit test for all
2020-06-30 12:09:48 +08:00
Rui Xu ab77af82d6
add set_random_seed and use rank shift feature (#373) 2020-06-29 22:26:58 +08:00
zhuyuanhao e43fe0e243
remove cuda args (#372) 2020-06-29 21:14:09 +08:00
zhuyuanhao d9549fba04
fix cpp header error (#371)
* 1. use macro USE_PARROTS control header include
2. add clang-format google style in pre-commit

* use MMCV_ macros
2020-06-29 18:48:50 +08:00
louzana 2c6fc5fd9b
fix bug of building ConvModule with HSigmoid using inplace=True and a… (#369)
* fix bug of building ConvModule with HSigmoid using inplace=True and add corresponding unittest

* fix linting
2020-06-28 23:27:14 +08:00
zhuyuanhao c0f5492ee9
add ext ops, support parrots (#310)
* add ext ops, support parrots

* fix lint

* fix lint

* update op from mmdetection

* support non-pytorch env

* fix import bug

* test not import mmcv.op

* rename mmcv.op to mmcv.ops

* fix compile warning

* 1. fix syncbn warning in pytorch 1.5
2. support only cpu compile
3. add point_sample from mmdet

* fix text bug

* update docstrings

* fix line endings

* minor updates

* remove non_local from ops

* bug fix for nonlocal2d

* rename ops_ext to _ext and _ext to _flow_warp_ext

* update the doc

* try clang-format github action

* fix github action

* add ops to api.rst

* fix cpp format

* fix clang format issues

* remove .clang-format

Co-authored-by: Kai Chen <chenkaidev@gmail.com>
2020-06-28 23:15:47 +08:00
Kai Chen a7bf770168
bump version to v0.6.2 (#368) 2020-06-26 21:46:18 +08:00
Jintao Lin 9bc0b96d02
Add utils to calculate model complexity and adjust folder structure for mmcv/cnn/utils . (#366)
* Add utils to calculate model complexity info

* remove _InstanceNorm in unittest

* add docstring and increase unittest coverage

* fix deconv_flops_counter_hook to accept different data shape

* test when model is not a common instance

* put flops_counter.py and weight_init.py into mmcv/cnn/utils folder

* fix import name

* reformat some docstrings

* update the scripts with latest one and remove redundant codes

* directly represent a model without string and eval()

* reformat code
2020-06-26 21:38:29 +08:00
Y. Xiong fcced0f0f8
Lite version: use mmcv without installing pytorch as a requirement (#367)
* use mmcv without installing pytorch

* add new line

* revise utils.init by try-except-else block

* add new line to utils.init

* del whitespace in new line

* add flake8 ignore to utils.__init__
2020-06-25 17:42:44 +08:00
Harry 69048ff056
Specifying distributed training port in os.environ when training with slurm (#362)
* feat: support for os.environ port for slurm training

* fix: port data type

* feat: add flawed unittest

* feat: add flawed unittest

* docs: add comments

* fix: unittest

* fix: unittest
2020-06-20 00:49:44 +08:00
Jerry Jiarui XU 8e80223e93
add more HRNet (#360) 2020-06-19 22:33:45 +08:00
Kai Chen 17d2aa5bc6
Bump version to v0.6.1 (#361) 2020-06-19 21:51:04 +08:00
louzana fef7b2fea4
add hswish and hsigmoid (#358)
* add hswish and hsigmoid

* fix linting

* fix linting

* delete useless staticmethod in cnn/bricks/hsigmoid.py

* forward(x) ==> forward(seld, x)

* add unittests for hsigmoid and hswish

* use torch.equal instead of numpy.equal
2020-06-19 21:35:17 +08:00
Jerry Jiarui XU e3d9bf42c5
add resnetv1c (#359) 2020-06-19 18:07:44 +08:00
Harry 68708cfbe6
fix: update module wrapper register_module (#357) 2020-06-19 00:45:46 +08:00
Kai Chen 12aab3e19e
bump version to 0.6.0 (#356) 2020-06-18 22:15:22 +08:00
Harry 4808988117
Fix potential bug in DefaultOptimizerConstructor (#355)
* fix: fix custom_keys whenweight_decay is not specified

* docs: small fix

* feat: add type check

* refactor: move if outside for
2020-06-18 22:07:16 +08:00
Jintao Lin dcc20f3a4b
Add `_NonLocalNd` module (#331)
* add non_local module

* rewrite non local module comments

* perfect docstring and adjust init function

* not to init norm layer

* Correct initialize when there is a norm

* set normal method for both embedded_gaussian and dot_product
2020-06-18 20:56:48 +08:00
Kai Chen 6bb244f255
add train_step() and val_step() for MMDP (#354) 2020-06-18 20:55:53 +08:00
Harry c74d729d92
Add custom_group to DefaultOptimizerConstrutor (#347)
* feat: add custom_group to DefaultOptimConstrutor

* refactor: move custom_groups validate to _validate_cfg

* docs: add doc to explain custom_groups

* feat: add unittest for non_exist_key

* refactor: one param per group

* fix: small fix

* fix: name

* docs: docstring

* refactor: change to mult for only lr and wd custom

* docs: docstring

* docs: more explaination

* feat: sort custom key

* docs: add docstring

* refactor: use reverse arg of sorted

* docs: fix comment

* docs: fix comment

* refactor: small modi

* refactor: small modi

* refactor: small modi
2020-06-17 23:39:50 +08:00
Kai Chen 657f03ad08
replace DeprecationWarning with UserWarning (#353) 2020-06-17 20:52:48 +08:00
Harry 799421003d
Add module wrapper registry (#352)
* feat: modify parallel to module wrapper

* fix: unittest

* fix: add registry file

* feat: add module wrapper unittest
2020-06-17 20:12:54 +08:00
Jerry Jiarui XU c6784f4acf
add backend arg (#350)
* add backend arg

* add test

* update doc, add test

* update test

* update doc
2020-06-17 19:42:31 +08:00
Wang Xinjiang f48241a65a
load_checkpoint support normal dict checkpoints (#351)
* load_checkpoint support normal dict checkpoints

* comments
2020-06-17 17:10:04 +08:00
Rui Xu 97f9efd825
fix bug in using inner iter when by_epcoh==True (#346)
* fix bug in using inner iter when by_epcoh==True

* set default for log config

* fix bug: remove optim in val, use iter in log when by_epoch is False
2020-06-17 14:01:11 +08:00
Wang Xinjiang 630b747cb1
added pillow backend in loading (#333)
* added pillow backend in loading

* reformat

* remove auto fill for RGBA

* change according to comments

* change according to comments

* reformat
2020-06-17 10:25:48 +08:00
Wang Xinjiang 3f4c9fd0c8
fix possible bugs brought by dumping grad_norm to the logger in pytorch1.5 (#349) 2020-06-16 23:16:26 +08:00
Harry f28a7c7ed7
Add CosineRestartLrUpdaterHook (#319)
* feat: add CosineRestartLrUpdaterHook

* style: rename period to periods

* fix: bug in period 0

* feat: rename eta_min to min_lr and add min_lr_ratio

* docs: fix docstring of restart lr updater

* refactor: use annealing_cos

* docs: add docstring to annealing_cos

* feat: cosine restart lr update hook

* refactor: modify code order for unittest
2020-06-15 23:01:26 +08:00
lizz 9f04477f93
Harmless changes (#340)
* harmless changes

Signed-off-by: lizz <lizz@sensetime.com>

* Update conv_module.py

* No bracket for simple class

Signed-off-by: lizz <lizz@sensetime.com>
2020-06-15 11:29:01 +08:00
Wenwei Zhang e8fa66aa16
Add regnet 400mf model (#342) 2020-06-14 21:10:05 +08:00
Cao Yuhang c30e91db87
share torch version (#343) 2020-06-14 21:09:48 +08:00
lizz b87e774f66
Remove more unused things (#338)
* Remove more unused things

Signed-off-by: lizz <lizz@sensetime.com>

* panic

Signed-off-by: lizz <lizz@sensetime.com>
2020-06-13 20:19:30 +08:00
Jintao Lin 5a98f7e421
enalbe memcached support in PetrelBackend (#341) 2020-06-13 18:32:48 +08:00
lizz 5f611bbb39
Update lr_updater.py (#334) 2020-06-12 23:40:09 +08:00
lizz 6988de82b4
Update optflow.py (#335) 2020-06-12 23:36:09 +08:00
Harry 67a26da917
Add IterBasedRunner (#314)
* feat: add IterBasedRunner

* fix: unittest

* feat: more unittest

* fix: expose dataloader len

* minor updates of BaseRunner

* refactor: remove CosineRestartLrUpdaterHook

* style: add docstring

* refactor: update IterTextLoggerHook: fstring and exp_name

* fix: epoch_runner unittest

* refactor: remove IterBasedTextLogger

* fix: old IterTextLoggerHook issue

* refactor: remove __len__ of IterLoader

* feat: add IterBasedRunner to init

* feat: add __len__ to IterLoader

* fix some docstrings

* refactor: use is_parallel_module

* fix: import issue

* fix: runner unittest missing logger

* fix checkpoints

* feat: add by_epoch default value to IterBaseRunner regitering loggger_hook

* refactor: remove setting by_epoch in log_config

* minor refactoring

* docs: add docstring

* fix: remove unused doc

* update the log info for saving checkpoints

Co-authored-by: Kai Chen <chenkaidev@gmail.com>
2020-06-11 13:35:34 +08:00
Jerry Jiarui XU 61f9e91c9f
Add syntax check in .py config (#330)
* Add syntax check in .py config

* rename validate
2020-06-10 23:07:59 +08:00
Jerry Jiarui XU 2aa7712cb7
add more act w.o. inplace opt (#329) 2020-06-10 15:42:09 +08:00
Harry f5be29b2b0
fix: fix constructor docstring (#328) 2020-06-09 09:24:19 +08:00
Kai Chen 821b3ad622
Fix the BC issue of ddp (#325)
* fix the BC issue of ddp

* minor fix for the docstring
2020-06-08 22:34:19 +08:00
Wang Xinjiang 41ca64cb4b
add gradient norm to logger (#326) 2020-06-08 17:07:59 +08:00
Joanna e7a446ae0f
add len to DC (#320)
Co-authored-by: lixuanyi <lixuanyi@sensetime.com>
2020-06-05 15:02:11 +08:00
wang shiguang d128398121
Parrots wrapper (#316)
* add parrots and pytorch dataloader wrapper

* fix commit

Co-authored-by: wangshiguang <wangshiguang@sensetime.com>
2020-06-05 14:07:01 +08:00