(module, name, config, *args, **kwargs)
| 17 | |
| 18 | |
| 19 | def get_instance(module, name, config, *args, **kwargs): |
| 20 | return getattr(module, config[name]['type'])(*args, **config[name]['args'], **kwargs) |
| 21 | |
| 22 | |
| 23 | def main(config, resume, output_root_dir=None, pretrained_path=None): |