text_plain_output_1.png
from keras.preprocessing.image import ImageDataGenerator,load_img

train_gen = ImageDataGenerator(rescale=1 / 255.0, validation_split=0.3)
train_data = train_gen.flow_from_directory('/kaggle/input/rice-image-dataset/Rice_Image_Dataset/', target_size=(64, 64), batch_size=1, class_mode='categorical', shuffle=False, subset='training')

test_data = train_gen.flow_from_directory('/kaggle/input/rice-image-dataset/Rice_Image_Dataset/', target_size=(64, 64), batch_size=1, class_mode='categorical', shuffle=False, subset='validation')