The title was to long, but I edited my comment for clarification. Hyperparameter optimization is normally done with gradient-free-optimization techniques, since a gradient cannot be computed. This is opposed to the optimization of parameters during training (e.g. neural network weights).