Skip to content

Commit

Permalink
add comment for wholemodule
Browse files Browse the repository at this point in the history
  • Loading branch information
MeowZheng committed Mar 24, 2021
1 parent 0254ee2 commit d4eef56
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mmcv/cnn/utils/weight_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit d4eef56

Please sign in to comment.