MCPcopy Create free account
hub / github.com/albertpumarola/GANimation / ModelsFactory

Class ModelsFactory

models/models.py:5–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3from torch.optim import lr_scheduler
4
5class 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
23class BaseModel(object):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected