mirror of
https://github.com/open-mmlab/mmcv.git
synced 2025-06-03 21:54:52 +08:00
add model urls for HRNet (#68)
This commit is contained in:
parent
8e84059cee
commit
c234cdea80
@ -25,6 +25,9 @@ open_mmlab_model_urls = {
|
||||
'jhu/resnext101_32x4d_gn_ws': 'https://s3.ap-northeast-2.amazonaws.com/open-mmlab/pretrain/third_party/resnext101_32x4d_gn_ws-34ac1a9e.pth', # noqa: E501
|
||||
'jhu/resnext50_32x4d_gn': 'https://s3.ap-northeast-2.amazonaws.com/open-mmlab/pretrain/third_party/resnext50_32x4d_gn-c7e8b754.pth', # noqa: E501
|
||||
'jhu/resnext101_32x4d_gn': 'https://s3.ap-northeast-2.amazonaws.com/open-mmlab/pretrain/third_party/resnext101_32x4d_gn-ac3bb84e.pth', # noqa: E501
|
||||
'msra/hrnetv2_w18': 'https://s3.ap-northeast-2.amazonaws.com/open-mmlab/pretrain/third_party/hrnetv2_w18-00eb2006.pth', # noqa: E501
|
||||
'msra/hrnetv2_w32': 'https://s3.ap-northeast-2.amazonaws.com/open-mmlab/pretrain/third_party/hrnetv2_w32-dc9eeb4f.pth', # noqa: E501
|
||||
'msra/hrnetv2_w40': 'https://s3.ap-northeast-2.amazonaws.com/open-mmlab/pretrain/third_party/hrnetv2_w40-ed0b031c.pth', # noqa: E501
|
||||
} # yapf: disable
|
||||
|
||||
|
||||
@ -57,11 +60,11 @@ def load_state_dict(module, state_dict, strict=False, logger=None):
|
||||
try:
|
||||
own_state[name].copy_(param)
|
||||
except Exception:
|
||||
raise RuntimeError('While copying the parameter named {}, '
|
||||
'whose dimensions in the model are {} and '
|
||||
'whose dimensions in the checkpoint are {}.'
|
||||
.format(name, own_state[name].size(),
|
||||
param.size()))
|
||||
raise RuntimeError(
|
||||
'While copying the parameter named {}, '
|
||||
'whose dimensions in the model are {} and '
|
||||
'whose dimensions in the checkpoint are {}.'.format(
|
||||
name, own_state[name].size(), param.size()))
|
||||
missing_keys = set(own_state.keys()) - set(state_dict.keys())
|
||||
|
||||
err_msg = []
|
||||
|
Loading…
x
Reference in New Issue
Block a user