Commit afb4e78c authored by suiguoxin's avatar suiguoxin
Browse files

update gridsearch quniform to conform with BOHB

parent 05913424
......@@ -97,9 +97,8 @@ class GridSearchTuner(Tuner):
def _parse_quniform(self, param_value):
'''parse type of quniform parameter and return a list'''
low, high, interval = param_value[0], param_value[1], param_value[2]
count = int(np.floor((high - low) / interval)) + 1
return [low + interval * i for i in range(count)]
low, high, q = param_value[0], param_value[1], param_value[2]
return np.clip(np.arange(np.round(low/q), np.round(high/q)+1) * q, low, high)
def _parse_randint(self, param_value):
'''parse type of randint parameter and return a list'''
......
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