Wrapping model as KerasRegressor in order to uses GridSearchCV

In the day 4 regression notebook the tensorflow model needed to be wrapped as a KerasRegressor in order to be able to make use of GridSearchCV for hyperparameter tuning.
How exactly did this work and how are the parameters passed from the GridSearch caller to the model-fit level? It looked like the batch parameter was part of the parameter dictionary, while the learning rate is passed directly into create_model.


Parameters to KerasRegressor Gridsearch CV takes both model parameters and fitting parameters. You can use default values to the buildfn inorder to create the estimator without passing any values to KerasRegressor.