Open campellcl opened 2 years ago
Probably too late, but isn't the sampling
parameter what you are looking for?
@campellcl
I am also probably too late, but I wanted to do something similar with the number of dense units, and this solution worked for me:
hp.num_neurons = hp.Choice('num_neurons', [2 ** _i for _i in range(8)])
Hope this helps you, or anyone else who comes across this question.
Is your feature request related to a problem? Please describe. Sometimes it may make sense to specify a non-linear range of hyperparameters. For instance, we may wish to experiment with a particular hyperparameter containing as values the powers of two: (i.e.
2^0
,2^1
,2^2
). It appears that this is currently difficult to do inkeras-tuner
, as thestep
argument in thehyperparameters.Int
constructor only takes an integer value as input. The same is true for thehyperparameters.Float
constructor.Describe the solution you'd like It would be very helpful to be able to specify a
Callable
as an argument tostep
, for instance:Or perhaps, allow a pre-defined list of steps, as in:
Describe alternatives you've considered It is mentioned in the documentation for the
step
argument of theFloat
constructor that:I have looked at the
Oracle
base class documentation, it may be possible to implement this in thepopulate_space
method, but it would be misleading. As we would be defining a step size up front as an integer, and then ignoring that information when populating the search space for each trial.Additional context None.