trw.hparams.params_optimizer_random_search
¶
Module Contents¶
Classes¶
Random hyper parameter run on a single machine |
Functions¶
|
Log string to console |
|
Export the loss as self contained .pkl file to be analyzed later |
|
reload the loss as self contained .pkl file to be analyzed later |
Attributes¶
- trw.hparams.params_optimizer_random_search.logger¶
- trw.hparams.params_optimizer_random_search.log_random(string)¶
Log string to console
- trw.hparams.params_optimizer_random_search.store_loss_params(output_location, loss, infos, hyper_parameters)¶
Export the loss as self contained .pkl file to be analyzed later
- trw.hparams.params_optimizer_random_search.load_loss_params(output_location)¶
reload the loss as self contained .pkl file to be analyzed later
- class trw.hparams.params_optimizer_random_search.HyperParametersOptimizerRandomSearchLocal(evaluate_hparams_fn, repeat, log_string=log_random, result_prefix='hparams-random')¶
Random hyper parameter run on a single machine
We need to define the hyper parameter evaluation function:
def evaluate_hparams(hparams): # evaluate an hyper-parameter configuration and return a loss value and some additional information # e.g., result report return 0.0, {}
- optimize(self, result_path)¶
Optimize the hyper-parameter search using random search
- Parameters
result_path – where to save the information of each run. Can be None, in this case nothing is exported.
- Returns
the results of all the runs