title: Tensorflow DNNClassifier and scikit-learn GridSearchCV issues
body: <p>It's been a few hours now that I tried performing an hyperparameters optimization over a tensorflow DNN model using <code>GridSearchCV</code>. The latest version of my code is the following:</p>
  
  <pre><code>import random
  from tensorflow.contrib.learn.python import learn
  from sklearn import datasets
  from sklearn.model_selection import GridSearchCV
  from sklearn.metrics import accuracy_score
  
  random.seed(42)
  iris = datasets.load_iris()
  feature_columns = learn.infer_real_valued_columns_from_input(iris.data)
  classifier = learn.DNNClassifier(
            feature_columns=feature_columns,
            hidden_units=[10, 20, 10],
            n_classes=3)
  grid_search = GridSearchCV(
            classifier, {'hidden_units': [[5, 5], [10, 10]]},
            scoring='accuracy',
            fit_params={'steps': [50]})
  grid_search.fit(iris.data, iris.target)
  score = accuracy_score(iris.target, grid_search.predict(iris.data))
  </code></pre>
  
  <p>I have actually taken it from <a href="https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/learn/python/learn/grid_search_test.py" rel="nofollow noreferrer">a test in the <code>tensorflow</code> library itself</a>.</p>
  
  <p>When I run it I get the following error:</p>
  
  <pre><code>---------------------------------------------------------------------------
  TypeError                                 Traceback (most recent call last)
  &lt;ipython-input-4-dce950001f99&gt; in &lt;module&gt;()
       16           scoring='accuracy',
       17           fit_params={'steps': [50]})
  ---&gt; 18 grid_search.fit(iris.data, iris.target)
       19 score = accuracy_score(iris.target, grid_search.predict(iris.data))
  
  /home/nmiotto/Development/upday/hellseher/playground/lib/python3.5/site-packages/sklearn/model_selection/_search.py in fit(self, X, y, groups)
      943             train/test set.
      944         """
  --&gt; 945         return self._fit(X, y, groups, ParameterGrid(self.param_grid))
      946 
      947 
  
  /home/nmiotto/Development/upday/hellseher/playground/lib/python3.5/site-packages/sklearn/model_selection/_search.py in _fit(self, X, y, groups, parameter_iterable)
      548                                      n_candidates * n_splits))
      549 
  --&gt; 550         base_estimator = clone(self.estimator)
      551         pre_dispatch = self.pre_dispatch
      552 
  
  /home/nmiotto/Development/upday/hellseher/playground/lib/python3.5/site-packages/sklearn/base.py in clone(estimator, safe)
       68     for name, param in six.iteritems(new_object_params):
       69         new_object_params[name] = clone(param, safe=False)
  ---&gt; 70     new_object = klass(**new_object_params)
       71     params_set = new_object.get_params(deep=False)
       72 
  
  TypeError: __init__() got an unexpected keyword argument 'params'
  </code></pre>
  
  <p>I am using <code>Python 3.5.2</code> have updated all the libraries to the latest version, more precisely:</p>
  
  <pre><code>$ pip3 freeze
  numpy==1.12.1
  scikit-learn==0.18.1
  scipy==0.19.0
  tensorflow==1.1.0
  </code></pre>
  
  <p>I ran out of ideas, I can't figure out what I am missing. Any help would be appreciated. 
  I am assuming of course that I don't have to monkey patch or hack anything into the existing libraries.</p>