tf.compat.v1.train.maybe_batch

View source on GitHub

Conditionally creates batches of tensors based on keep_input. (deprecated)

tf.compat.v1.train.maybe_batch(
    tensors, keep_input, batch_size, num_threads=1, capacity=32, enqueue_many=False,
    shapes=None, dynamic_pad=False, allow_smaller_final_batch=False,
    shared_name=None, name=None
)

Warning: THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: Queue-based input pipelines have been replaced by tf.data. Use tf.data.Dataset.filter(...).batch(batch_size) (or padded_batch(...) if dynamic_pad=True).

See docstring in batch for more details.

Args:

Returns:

A list or dictionary of tensors with the same types as tensors.

Raises: