MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / _validate_keep_input

Function _validate_keep_input

tensorflow/python/training/input.py:645–656  ·  view source on GitHub ↗

Validate `keep_input` argument to conditional batching functions.

(keep_input, enqueue_many)

Source from the content-addressed store, hash-verified

643
644
645def _validate_keep_input(keep_input, enqueue_many):
646 """Validate `keep_input` argument to conditional batching functions."""
647 keep_input = ops.convert_to_tensor(keep_input)
648 if keep_input.shape.ndims is None:
649 raise ValueError(
650 "`keep_input` dimensions must be known at graph construction.")
651 if not enqueue_many and keep_input.shape.ndims == 1:
652 raise ValueError(
653 "`keep_input` cannot be a vector when `enqueue_many=False`.")
654 if keep_input.shape.ndims > 1:
655 raise ValueError("`keep_input` must be 0 or 1 dimensions.")
656 return keep_input
657
658
659def _dtypes(tensor_list_list):

Callers 5

bucketFunction · 0.85
_batchFunction · 0.85
_batch_joinFunction · 0.85
_shuffle_batchFunction · 0.85
_shuffle_batch_joinFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected