title: Example of using a KerasRegressor in scikit-optimize
body: <p>I am using the awesome scikit-optimize toolbox for hyperparameter optimization.
  My goal is to compare keras and scikit-learn models.</p>
  <p>According to the example <a href="https://scikit-optimize.github.io/stable/auto_examples/sklearn-gridsearchcv-replacement.html#sphx-glr-auto-examples-sklearn-gridsearchcv-replacement-py" rel="nofollow noreferrer">https://scikit-optimize.github.io/stable/auto_examples/sklearn-gridsearchcv-replacement.html#sphx-glr-auto-examples-sklearn-gridsearchcv-replacement-py</a> only scikit learn models had been used. Trying something like the following code does not allow to integrate the keras mode in the BayesSearchCV.</p>
  <pre><code># Function to create model, required for KerasRegressor
  def create_model(optimizer='rmsprop', init='glorot_uniform'):
      # create model
      model = Sequential()
      model.add(Dense(12, input_dim=8, kernel_initializer=init, activation='relu'))
      model.add(Dense(8, kernel_initializer=init, activation='relu'))
      model.add(Dense(1, kernel_initializer=init, activation='linear'))
      # Compile model
      model.compile(loss='mse', optimizer=optimizer, metrics=['r2'])
      return model
  
  model = KerasRegressor(build_fn=create_model, verbose=0)
  NN_search = {
      'model': [model()],
      'model__optimizers': optimizers,
      'model__epochs' : epochs, 
      'model__batch_size' : batches, 
      'model__init' : init
  }
  </code></pre>
  <p>Has anyone managed to merge a KerasClassifier/Regressor into BayesSearch CV?</p>