Exercise

Implementing random search

Hyperparameter search is a computationally costly approach to experiment with different hyperparameter values. However, it can lead to performance improvements. In this exercise, you will implement a random search algorithm.

You will randomly sample 10 values of the learning rate and momentum from the uniform distribution. To do so, you will use the np.random.uniform() function.

The numpy package has already been imported as np.

Instructions

100 XP
  • Randomly sample a learning rate factor such that the learning rate is bounded between 0.01 and 0.0001.
  • Randomly sample a momentum between 0.85 and 0.99.