MCPcopy Create free account
hub / github.com/DeepGraphLearning/graphvite / __new__

Method __new__

python/graphvite/optimizer.py:37–43  ·  view source on GitHub ↗
(cls, type=auto, *args, **kwargs)

Source from the content-addressed store, hash-verified

35 can be 'SGD', 'Momentum', 'AdaGrad', 'RMSprop' or 'Adam'
36 """
37 def __new__(cls, type=auto, *args, **kwargs):
38 if type == auto:
39 return lib.optimizer.Optimizer(auto)
40 elif hasattr(lib.optimizer, type):
41 return getattr(lib.optimizer, type)(*args, **kwargs)
42 else:
43 raise ValueError("Unknown optimizer `%s`" % type)
44
45
46for name in find_all_names(lib.optimizer):

Callers

nothing calls this directly

Calls 1

OptimizerMethod · 0.80

Tested by

no test coverage detected