[https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/runner.py#L1723]()
In runner.train(), _init_model_weights() will be forcefully executed. However, when using timm.create_model("xxx", pretrained=True), in some cases(not all) it returns a model with member function .init_weights() (e.g. "resnext50_32x4d.tv_in1k"). Then the pretrained model weights will be overlayed by _init_model_weights() even if someone wants to keep the pretrained weights. No options are provided to mute the execution of _init_model_weights().
Prerequisite
Environment
pip install mmengine
Reproduces the problem - code sample
Reproduces the problem - command or script
none
Reproduces the problem - error message
none
Additional information
[https://github.com/open-mmlab/mmengine/blob/main/mmengine/runner/runner.py#L1723]() In runner.train(), _init_model_weights() will be forcefully executed. However, when using timm.create_model("xxx", pretrained=True), in some cases(not all) it returns a model with member function .init_weights() (e.g. "resnext50_32x4d.tv_in1k"). Then the pretrained model weights will be overlayed by _init_model_weights() even if someone wants to keep the pretrained weights. No options are provided to mute the execution of _init_model_weights().