Commit 10a6c31b authored by Marius Kriegerowski's avatar Marius Kriegerowski


parent 782084ea
......@@ -9,16 +9,20 @@ class Optimizer(Object):
path_best = String.T(default='winner')
def evaluate(self, model):
result = model.train()
loss = result['loss']
return loss
def __init__(self, **kwargs):
self.model = None
def optimize(self):
def evaluate(self, **kwargs):
''' wrapper to parse gp_minimize args to model.train'''
return self.model.train(**kwargs)['loss']
def optimize(self, model):
self.model = model
default_parameters = [
gp_minimize(func=self.evaluate, x0=default_parameters)
gp_minimize(func=model.train, x0=default_parameters)
def log_dir_name(self, learning_rate):
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment