GridSearchCV vs RandomSearchCV and How it works?
Imagine the following scenario:

params = {
   epoch = [20, 30, 40, 50], #those numbers are only for example
   dense_layer_size = [20, 30], 
   second_danse_layer = [30, 40]    
}


In GridSearch you try all the combinations of your parameters, in this case: 

(4 * 2 * 2) = 16 #Total of parameters


In RandomSearch as in documentation: 


  Not all parameter values are tried out, but rather a fixed number of parameter settings is sampled from the specified distributions. The number of parameter settings that are tried is given by n_iter.


In this case, he select "n_iter" number of combinations and try then. Is good for optimizing less parameters, but, in cases when you don't have sure about multiples parameters, may let aside some combinations that would be better. 

Another good approach, is Using an genetic algorithm to optimize your network.

Genetic algorithm generate a few combinations of "individuals" (combination of parameters) and at each step, select the best individuals(called parents) and crossover then, generating more individuals with the characteristic from both parents. This way, in some case you can optimize your network and add random elements when you don't have sure about what parameter would be increase your result. 

If you want an easy to integrate genetic algorithm you can check this project.