title: Specify Input Argument with KerasRegressor
body: <p>I use a Keras neural network and I would like the input dimension to be automatically set, not hardcoded like in every tutorial I have seen so far. How could I accomplish this?</p>
  <p>My code:</p>
  <pre><code>from keras.models import Sequential
  from keras.layers import Dense
  from keras.wrappers.scikit_learn import KerasRegressor
  seed = 1
  
  X = df_input
  Y = df_res
  
  def baseline_model(x):
      # create model
      model = Sequential()    
      model.add(Dense(20, input_dim=x, kernel_initializer='normal', activation=relu))
      model.add(Dense(1, kernel_initializer='normal'))
      # Compile model
      model.compile(loss='mean_absolute_error', optimizer='adam')
      return model
  
  inpt  = len(X.columns)
  estimator = KerasRegressor(build_fn = baseline_model(inpt  ) , epochs=2, batch_size=1000, verbose=2)
  estimator.fit(X,Y)
  </code></pre>
  <p>And the error I get:</p>
  <blockquote>
  <p>Traceback (most recent call last):</p>
  <p>File ipython-input-2-49d765e85d15, line 20, in  estimator.fit(X,Y)</p>
  <p>TypeError: <strong>call</strong>() missing 1 required positional argument: 'inputs'</p>
  </blockquote>