title: Tensorflow estimator: Different epoch number gives the same result
body: <p>I want to create a simple model using TF Estimator. Below is my code:</p>
  
  <pre><code>num_epoch = 4
  num_train = 186
  num_test = 81
  
  # 1 Define input function
  def input_function(x, y, is_train):
  
      dict_x = {
          "featurename" : x,
      }
  
      dataset = tf.data.Dataset.from_tensor_slices((
          dict_x, y
      ))
  
      if is_train:
          dataset = dataset.shuffle(num_train, seed=113).repeat(num_epoch).batch(num_train)
      else:   
          dataset = dataset.batch(num_test)
      return dataset
  
  def my_serving_input_fn2():
      input_data = {
          "featurename" : tf.placeholder(tf.float32, [None, 15], name='inputtensors')
      }
      return tf.estimator.export.ServingInputReceiver(input_data, input_data)
  
  
  def main(argv):
      tf.set_random_seed(113)
      np.random.seed(113)
      run_config = tf.estimator.RunConfig(save_summary_steps=None, save_checkpoints_secs=None, tf_random_seed=113)
  
      # 2 Define feature columns
      feature_columns = [
          tf.feature_column.numeric_column(key="featurename",shape=15),
      ]
  
      # 3 Define an estimator
      classifier = tf.estimator.DNNClassifier(
          feature_columns=feature_columns,
          hidden_units=[15, 15],
          n_classes=3,
          optimizer=tf.train.AdamOptimizer(),
          activation_fn=tf.nn.relu,
          model_dir = 'models/',
          config=run_config
      )
  
      # Train the model
      classifier.train(
          input_fn=lambda:input_function(X_train, y_train, True)
      )
  
      # Evaluate the model
      eval_result = classifier.evaluate(
          input_fn=lambda:input_function(X_test, y_test, False)
      )
  
      print('\nTest set accuracy: {accuracy:0.3f}\n'.format(**eval_result))
  
  if __name__ == "__main__":
      os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' 
      tf.app.run(main)
  </code></pre>
  
  <p>I believe the model will be trained <code>num_epoch</code> times as <code>num_epoch</code> affect dataset's <code>repeat()</code>. I didn't define <code>steps</code> in estimator so it will be trained forever until <code>input_fn</code> generates the <code>tf.errors.OutOfRange</code>.</p>
  
  <p>But if I change <code>num_epoch</code> value it always gives the same result. For example, when I run this program with <code>num_epoch=4</code> and <code>num_epoch=400</code> the test set accuracy will be the same.</p>
  
  <p>Am I misunderstanding the training process here? or it's just a coincidence? I hope someone can help explain why this happened</p>