label_map = (train.ds.class_indices)
img_height,img_width=180,100 batch_size=32 train_ds = tf.keras.preprocessing.image_dataset_from_directory(data_dir1,validation_split=0.01,subset="training",seed=123,image_size=(img_height, img_width),batch_size=batch_size)
Output: Found 1376 files belonging to 4 classes.
Using 1363 files for training.
how can I get the total number of classes in a variable?
how to obtain the number of classes using tf.keras.preprocessing.image_dataset_from_directory?