Manual Random Parameter Search
The manual_random_param_search_example.py example scripts demonstrate a random parameter search by automating the execution of an experiment, multiple times, each time with a different set of random hyperparameters. That experiment must run first. It is named
Keras HP optimization base, and is created by running another Trains example script, base_template_keras_simple.py
This example accomplishes the automated random parameter search by doing the following:
- Creating a parameter dictionary, which we connect to the Task by calling Task.connect so that the parameters are logged by Trains.
- Adding the random search hyperparameters and parameters defining the search (e.g., the experiment name, and number of times to run the experiment).
- Creating a Task object referencing the experiment.
- For each set of parameters:
When the example script runs, it creates an experiment named
Random Hyper-Parameter Search Example which is associated with the
examples project. This starts the parameter search, and creates the experiments:
Keras HP optimization base 0
Keras HP optimization base 1
Keras HP optimization base 2.
When they complete, you can compare the experiment results.