Skip to content
Snippets Groups Projects
Commit 5074eb1a authored by youkaichao's avatar youkaichao Committed by Kai Chen
Browse files

Typo (#316)

* correct typo

* correct registry typo

* remove f-string

* readme.md
parent 24da4c81
No related branches found
No related tags found
No related merge requests found
...@@ -184,7 +184,7 @@ We provide a training script using the launch utility provided by PyTorch. ...@@ -184,7 +184,7 @@ We provide a training script using the launch utility provided by PyTorch.
Supported arguments are: Supported arguments are:
- --validate: perform evaluation every k (default=1) epochs during the training. - --validate: perform evaluation every k (default=1) epochs during the training.
- --work_dir <WORK_DIR>: if specified, the path in config file will be overwritten. - --work_dir <WORK_DIR>: if specified, the path in config file will be replaced.
Expected results in WORK_DIR: Expected results in WORK_DIR:
......
...@@ -24,7 +24,7 @@ class Registry(object): ...@@ -24,7 +24,7 @@ class Registry(object):
if not issubclass(module_class, nn.Module): if not issubclass(module_class, nn.Module):
raise TypeError( raise TypeError(
'module must be a child of nn.Module, but got {}'.format( 'module must be a child of nn.Module, but got {}'.format(
type(module_class))) module_class))
module_name = module_class.__name__ module_name = module_class.__name__
if module_name in self._module_dict: if module_name in self._module_dict:
raise KeyError('{} is already registered in {}'.format( raise KeyError('{} is already registered in {}'.format(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment