Source code for qewton.backends.optim
from qewton.backends.base import Backend, TensorType
[docs]
class OptimBackend(Backend[TensorType]):
[docs]
@staticmethod
def setup_optimizer():
raise NotImplementedError
[docs]
@staticmethod
def do_optimization_step():
raise NotImplementedError
@staticmethod
def _cleanup():
raise NotImplementedError
@staticmethod
def _closure():
raise NotImplementedError
# optim creators
[docs]
@staticmethod
def adam(*args, **kwargs):
raise NotImplementedError
[docs]
@staticmethod
def sgd(*args, **kwargs):
raise NotImplementedError
[docs]
@staticmethod
def lbfgs(*args, **kwargs):
raise NotImplementedError
# lr scheduler creators
[docs]
@staticmethod
def step_lr(*args, **kwargs):
raise NotImplementedError
[docs]
@staticmethod
def exponential_lr(*args, **kwargs):
raise NotImplementedError
[docs]
@staticmethod
def cosine_annealing_lr(*args, **kwargs):
raise NotImplementedError