Create a model given the option. This function warps the class CustomDatasetDataLoader. This is the main interface between this package and 'train.py'/'test.py' Example: >>> from models import create_model >>> model = create_model(opt)
(opt)
| 52 | |
| 53 | |
| 54 | def create_model(opt): |
| 55 | """Create a model given the option. |
| 56 | |
| 57 | This function warps the class CustomDatasetDataLoader. |
| 58 | This is the main interface between this package and 'train.py'/'test.py' |
| 59 | |
| 60 | Example: |
| 61 | >>> from models import create_model |
| 62 | >>> model = create_model(opt) |
| 63 | """ |
| 64 | model = find_model_using_name(opt.model) |
| 65 | instance = model(opt) |
| 66 | print("model [%s] was created" % type(instance).__name__) |
| 67 | return instance |
no test coverage detected