We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6a621b5 + 3f543f1 commit 9d294cdCopy full SHA for 9d294cd
timm/models/_builder.py
@@ -220,7 +220,7 @@ def load_pretrained(
220
if pretrained_path.is_dir():
221
state_dict = load_state_dict_from_path(pretrained_path)
222
else:
223
- RuntimeError(f"Specified path is not a directory: {pretrained_loc}")
+ raise RuntimeError(f"Specified path is not a directory: {pretrained_loc}")
224
225
model_name = pretrained_cfg.get('architecture', 'this model')
226
raise RuntimeError(f"No pretrained weights exist for {model_name}. Use `pretrained=False` for random init.")
0 commit comments