You need to sign in or sign up before continuing.
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): ...@@ -47,8 +47,8 @@ class BaseModule(nn.Module, metaclass=ABCMeta):
module.init_weight() module.init_weight()
self._is_init = True self._is_init = True
else: else:
warnings.warn('This module has bee initialized, \ warnings.warn(f'init_weight of {self.__class__.__name__} has '
please call initialize(module, init_cfg) to reinitialize it') f'been called more than once.')
def __repr__(self): def __repr__(self):
s = super().__repr__() 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