Creates a dataset that stops iteration when predicate` is false.
tf.raw_ops.TakeWhileDataset(
input_dataset,
other_arguments,
predicate,
output_types,
output_shapes,
metadata='',
name=None
)
The predicate function must return a scalar boolean and accept the
following arguments:
- One tensor for each component of an element of
input_dataset. - One tensor for each value in
other_arguments.
Args |
|---|
input_dataset
Tensor of type variant.
other_arguments
Tensor objects.
A list of tensors, typically values that were captured when
building a closure for predicate.
predicate
output_types
tf.DTypes that has length >= 1.
output_shapes
tf.TensorShape or list of ints) that has length >= 1.
metadata
string. Defaults to "".
name
Returns | |
|---|---|
A Tensor of type variant.
|