提交 a121a29f 编写于 作者: H Hongkun Yu 提交者: A. Unique TensorFlower

Remove examples_consume

PiperOrigin-RevId: 331857334
上级 ffce3f46
......@@ -102,7 +102,6 @@ class InputReader:
self._block_length = params.block_length
self._deterministic = params.deterministic
self._sharding = params.sharding
self._examples_consume = params.examples_consume
self._tfds_split = params.tfds_split
self._tfds_download = params.tfds_download
self._tfds_as_supervised = params.tfds_as_supervised
......@@ -237,9 +236,6 @@ class InputReader:
if self._is_training:
dataset = dataset.shuffle(self._shuffle_buffer_size)
if self._examples_consume > 0:
dataset = dataset.take(self._examples_consume)
def maybe_map_fn(dataset, fn):
return dataset if fn is None else dataset.map(
fn, num_parallel_calls=tf.data.experimental.AUTOTUNE)
......
......@@ -50,10 +50,6 @@ class DataConfig(base_config.Config):
element before cycling to another input element when interleaving files.
deterministic: A boolean controlling whether determinism should be enforced.
sharding: Whether sharding is used in the input pipeline.
examples_consume: An `integer` specifying the number of examples it will
produce. If positive, it only takes this number of examples and raises
tf.error.OutOfRangeError after that. Default is -1, meaning it will
exhaust all the examples in the dataset.
enable_tf_data_service: A boolean indicating whether to enable tf.data
service for the input pipeline.
tf_data_service_address: The URI of a tf.data service to offload
......@@ -87,7 +83,6 @@ class DataConfig(base_config.Config):
block_length: int = 1
deterministic: Optional[bool] = None
sharding: bool = True
examples_consume: int = -1
enable_tf_data_service: bool = False
tf_data_service_address: Optional[str] = None
tf_data_service_job_name: Optional[str] = None
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册