From the TF 2.3 release notes:
- tf.data.experimental.cardinality is now a method on tf.data.Dataset.
- tf.data.Dataset now supports len(Dataset) when the cardinality is finite.
We should make use of these functions here:
|
def num_examples(self, split) -> int: |
|
"""Compute the number of examples in a given split.""" |
|
|
|
return sum(self.splits[s].num_examples for s in base_splits(split)) |
From the TF 2.3 release notes:
We should make use of these functions here:
zookeeper/zookeeper/tf/dataset.py
Lines 114 to 117 in b0b9bcf