how do I split the dataset uploaded by
,
fill_mode='nearest',from tensorflow.keras.preprocessing.image import (
DirectoryIterator, ImageDataGenerator
)
# Your desired classes
desired_classes = [
'Tomato_Bacterial_spot',
'Tomato_Early_blight',
'Tomato_Late_blight',
'Tomato_Leaf_Mold',
'Tomato_Septoria_leaf_spot',
'Tomato_Spider_mites_Two_spotted_spider_mite',
'Tomato__Target_Spot',
'Tomato__Tomato_YellowLeaf__Curl_Virus',
'Tomato__Tomato_mosaic_virus',
'Tomato_healthy'
]
np.random.seed(seed)
dataset = DirectoryIterator(
directory='/kaggle/input/plant-village/PlantVillage',
image_data_generator=img_iterator,
classes=desired_classes,
target_size=(256,256),
batch_size=8
)
I have done the visualizations but failed to split it into training,validation and test datasets. I'm trying this code but it is not working
how can i overcome this problem for spliting directory_iterator dataset to splits?