'what does cardinality mean in relation to an image dataset?
After successfully creating a tensorflow image Dataset with:
dataset = tf.keras.utils.image_dataset_from_directory(...)
which returns
Found 21397 files belonging to 5 classes. Using 17118 files for training.
There is the cardinality method:
dataset.cardinality()
which returns a tensor containing the single value
tf.Tensor(535, shape=(), dtype=int64)
I've read the docs here but I don't understand what 535 represents or why its different to the number of files?
I ask, because I would like to understand how cardinality plays into this equation:
steps_per_epoch = dataset.cardinality().numpy() // batch_size
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
