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

Class RepeatDataset

tensorflow/python/data/ops/dataset_ops.py:2988–3003  ·  view source on GitHub ↗

A `Dataset` that repeats its input several times.

Source from the content-addressed store, hash-verified

2986
2987
2988class RepeatDataset(UnaryUnchangedStructureDataset):
2989 """A `Dataset` that repeats its input several times."""
2990
2991 def __init__(self, input_dataset, count):
2992 """See `Dataset.repeat()` for details."""
2993 self._input_dataset = input_dataset
2994 if count is None:
2995 self._count = constant_op.constant(-1, dtype=dtypes.int64, name="count")
2996 else:
2997 self._count = ops.convert_to_tensor(
2998 count, dtype=dtypes.int64, name="count")
2999 variant_tensor = gen_dataset_ops.repeat_dataset(
3000 input_dataset._variant_tensor, # pylint: disable=protected-access
3001 count=self._count,
3002 **self._flat_structure)
3003 super(RepeatDataset, self).__init__(input_dataset, variant_tensor)
3004
3005
3006class RangeDataset(DatasetSource):

Callers 1

repeatMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected