diff --git a/mmcv/runner/base_module.py b/mmcv/runner/base_module.py index 4cefddce03..418caa1a19 100644 --- a/mmcv/runner/base_module.py +++ b/mmcv/runner/base_module.py @@ -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__()