Unverified Commit 03491ed2 authored by ZhangShilong's avatar ZhangShilong Committed by GitHub
Browse files

[Enhancement]: add more detail of warning in basemodule (#899)

parent 75d907c9
......@@ -47,8 +47,8 @@ class BaseModule(nn.Module, metaclass=ABCMeta):
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__()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment