The code snippet is copied from TensorFlow's tutorial website (link). There are two code blocks, one for train_ds and the other for val_ds. They are identical except for the the subset= argument. I am wondering whether TensorFlow assigns the first 80% of the data to train_ds and the rest of the data to val_ds. If not, how does TensorFlow know which part is assigned to which? Thanks.
train_ds = tf.keras.preprocessing.image_dataset_from_directory(
data_dir,
validation_split=0.2,
subset="training",
seed=123,
image_size=(img_height, img_width),
batch_size=batch_size
)
val_ds = tf.keras.preprocessing.image_dataset_from_directory(
data_dir,
validation_split=0.2, #L: The same as above
subset="validation",
seed=123,
image_size=(img_height, img_width),
batch_size=batch_size
)