title: Predict in Tensorflow estimator using input fn
body: <p>I use the tutorial code from <a href="https://github.com/tensorflow/tensorflow/blob/r1.3/tensorflow/examples/learn/wide_n_deep_tutorial.py" rel="noreferrer">https://github.com/tensorflow/tensorflow/blob/r1.3/tensorflow/examples/learn/wide_n_deep_tutorial.py</a> and the code works fine until I tried to make a prediction instead of just evaluate it. I tried to make another function for prediction that look like this (by just removing parameter y):</p>
  
  <pre><code>def input_fn_predict(data_file, num_epochs, shuffle):
    """Input builder function."""
    df_data = pd.read_csv(
        tf.gfile.Open(data_file),
        names=CSV_COLUMNS,
        skipinitialspace=True,
        engine="python",
        skiprows=1)
    # remove NaN elements
    df_data = df_data.dropna(how="any", axis=0)
    labels = df_data["income_bracket"].apply(lambda x: "&gt;50K" in x).astype(int)
    return tf.estimator.inputs.pandas_input_fn( #removed paramter y
        x=df_data,
        batch_size=100,
        num_epochs=num_epochs,
        shuffle=shuffle,
        num_threads=5)
  </code></pre>
  
  <p>And to call it like this:</p>
  
  <pre><code>predictions = m.predict(
        input_fn=input_fn_predict(test_file_name, num_epochs=1, shuffle=True)
    )
    for i, p in enumerate(predictions):
        print(i, p)
  </code></pre>
  
  <ul>
  <li>Am I doing it right?</li>
  <li>Why do I get the prediction 81404 instead of 16282(number of line in test file)?</li>
  <li>Each line contains something like this: </li>
  </ul>
  
  <blockquote>
    <p>{'probabilities': array([ 0.78595656,  0.21404342], dtype=float32),
    'logits': array([-1.3007226], dtype=float32), 'classes': array(['0'],
    dtype=object), 'class_ids': array([0]), 'logistic': array([
    0.21404341], dtype=float32)}</p>
  </blockquote>
  
  <p>How do I read that?</p>