mirror of
https://github.com/open-mmlab/mmselfsup.git
synced 2025-06-03 14:59:38 +08:00
Change hook_cfg type access to hook_cfg.get() (#409)
This commit is contained in:
parent
e826153b2d
commit
a0087327da
@ -170,7 +170,7 @@ def train_model(model,
|
||||
assert isinstance(hook_cfg, dict), \
|
||||
'Each item in custom_hooks expects dict type, but got ' \
|
||||
f'{type(hook_cfg)}'
|
||||
if hook_cfg.type == 'DeepClusterHook':
|
||||
if hook_cfg.get('type', None) == 'DeepClusterHook':
|
||||
common_params = dict(dist_mode=True, data_loaders=data_loaders)
|
||||
else:
|
||||
common_params = dict()
|
||||
|
Loading…
x
Reference in New Issue
Block a user