From c78b1ec74d1c4aab88bca6e9010c7582c1f89706 Mon Sep 17 00:00:00 2001 From: Jianwei Xie Date: Thu, 1 Dec 2016 22:00:10 -0800 Subject: Change the default value for num_epochs from None to 1 for input_fn under learn_io package. Change: 140815606 --- tensorflow/contrib/learn/python/learn/learn_io/numpy_io.py | 2 +- tensorflow/contrib/learn/python/learn/learn_io/pandas_io.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tensorflow/contrib/learn/python/learn/learn_io/numpy_io.py b/tensorflow/contrib/learn/python/learn/learn_io/numpy_io.py index a004186eb0..2427e51f14 100644 --- a/tensorflow/contrib/learn/python/learn/learn_io/numpy_io.py +++ b/tensorflow/contrib/learn/python/learn/learn_io/numpy_io.py @@ -43,7 +43,7 @@ def _get_unique_target_key(features): def numpy_input_fn(x, y=None, batch_size=128, - num_epochs=None, + num_epochs=1, shuffle=True, queue_capacity=1000, num_threads=1): diff --git a/tensorflow/contrib/learn/python/learn/learn_io/pandas_io.py b/tensorflow/contrib/learn/python/learn/learn_io/pandas_io.py index ee62e777cd..e0ea6c6c4a 100644 --- a/tensorflow/contrib/learn/python/learn/learn_io/pandas_io.py +++ b/tensorflow/contrib/learn/python/learn/learn_io/pandas_io.py @@ -122,7 +122,7 @@ def extract_pandas_labels(labels): return labels -def pandas_input_fn(x, y=None, batch_size=128, num_epochs=None, shuffle=True, +def pandas_input_fn(x, y=None, batch_size=128, num_epochs=1, shuffle=True, queue_capacity=1000, num_threads=1, target_column='target', index_column='index'): """Returns input function that would feed pandas DataFrame into the model. @@ -134,8 +134,8 @@ def pandas_input_fn(x, y=None, batch_size=128, num_epochs=None, shuffle=True, y: pandas `Series` object. batch_size: int, size of batches to return. num_epochs: int, number of epochs to iterate over data. If `None` will - run indefinetly. - shuffle: int, if shuffle the queue. Please make sure you don't shuffle at + run forever. + shuffle: bool, if shuffle the queue. Please make sure you don't shuffle at prediction time. queue_capacity: int, size of queue to accumulate. num_threads: int, number of threads used for reading and enqueueing. -- cgit v1.2.3