From d4eef56b8cc8ecc33bdf3c6b0b2a3463c0e1b9c8 Mon Sep 17 00:00:00 2001 From: MeowZheng Date: Wed, 24 Mar 2021 16:29:26 +0800 Subject: [PATCH] add comment for wholemodule --- mmcv/cnn/utils/weight_init.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mmcv/cnn/utils/weight_init.py b/mmcv/cnn/utils/weight_init.py index 862410282b..fa9e321f4a 100644 --- a/mmcv/cnn/utils/weight_init.py +++ b/mmcv/cnn/utils/weight_init.py @@ -344,6 +344,9 @@ def __call__(self, module): def _initialize(module, cfg, wholemodule=False): func = build_from_cfg(cfg, INITIALIZERS) + # wholemodule flag is for override mode, there is no layer key in override + # and initializer will give init values for the whole module with the name + # in override. func.wholemodule = wholemodule func(module)