| 3 | from torch.optim import lr_scheduler |
| 4 | |
| 5 | class ModelsFactory: |
| 6 | def __init__(self): |
| 7 | pass |
| 8 | |
| 9 | @staticmethod |
| 10 | def get_by_name(model_name, *args, **kwargs): |
| 11 | model = None |
| 12 | |
| 13 | if model_name == 'ganimation': |
| 14 | from .ganimation import GANimation |
| 15 | model = GANimation(*args, **kwargs) |
| 16 | else: |
| 17 | raise ValueError("Model %s not recognized." % model_name) |
| 18 | |
| 19 | print("Model %s was created" % model.name) |
| 20 | return model |
| 21 | |
| 22 | |
| 23 | class BaseModel(object): |
nothing calls this directly
no outgoing calls
no test coverage detected