aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Jianwei Xie <xiejw@google.com>2016-12-01 22:00:10 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-12-01 22:04:48 -0800
commitc78b1ec74d1c4aab88bca6e9010c7582c1f89706 (patch)
treec8e93ca6ba4b59b4055775244d38a58db67da599
parent3a3431a4d818fa2527d5b8879c8470dd954bd3f2 (diff)
Change the default value for num_epochs from None to 1 for input_fn under learn_io package.
Change: 140815606
-rw-r--r--tensorflow/contrib/learn/python/learn/learn_io/numpy_io.py2
-rw-r--r--tensorflow/contrib/learn/python/learn/learn_io/pandas_io.py6
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.