-
Book Overview & Buying
-
Table Of Contents
Hyperparameter Tuning with Python
By :
Grid Search is one of the variants of the Exhaustive Search hyperparameter tuning group (see Chapter 3) that the NNI package can implement. To show you how we can implement Grid Search with the NNI package, let’s use the same data and pipeline as in the examples in the previous section. However, here, we’ll define a new hyperparameter space since NNI supports only limited types of sampling distribution.
The following code shows how to implement Grid Search with the NNI package. Here, we’ll use the NNI command-line tool (nnictl) instead of using pure Python code. You can find the more detailed code in the GitHub repository mentioned in the Technical requirements section:
model.py. There are several functions defined within this script, including load_data, get_default_parameters, get_model, and run. The load_data function loads the original data...