aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/training/input.py
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/python/training/input.py')
-rw-r--r--tensorflow/python/training/input.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tensorflow/python/training/input.py b/tensorflow/python/training/input.py
index 1755167938..21183823c2 100644
--- a/tensorflow/python/training/input.py
+++ b/tensorflow/python/training/input.py
@@ -762,6 +762,9 @@ def _shuffle_batch(tensors, batch_size, capacity, min_after_dequeue,
tensor_list = _as_tensor_list(tensors)
with ops.name_scope(name, "shuffle_batch",
list(tensor_list) + [keep_input]) as name:
+ if capacity <= min_after_dequeue:
+ raise ValueError("capacity %d must be bigger than min_after_dequeue %d."
+ % (capacity, min_after_dequeue))
tensor_list = _validate(tensor_list)
keep_input = _validate_keep_input(keep_input, enqueue_many)
tensor_list, sparse_info = _store_sparse_tensors(