Skip to content

Commit

Permalink
add more detail of warning in basemodule
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangshilong committed Mar 18, 2021
1 parent 00870b9 commit 0a7be2e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mmcv/runner/base_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ def init_weight(self):
module.init_weight()
self._is_init = True
else:
warnings.warn('This module has bee initialized, \
please call initialize(module, init_cfg) to reinitialize it')
warnings.warn(f'init_weight of {self.__class__.__name__} has '
f'been called more than once.')

def __repr__(self):
s = super().__repr__()
Expand Down

0 comments on commit 0a7be2e

Please sign in to comment.