python_for_microscopists icon indicating copy to clipboard operation
python_for_microscopists copied to clipboard

Error topIteration :=> train_img_gen.__next__()

Open diouck opened this issue 2 years ago • 2 comments

Hello, Very interesting your tutorial. However I have a problem to execute the eration .train_img_gen.next() Do you have an idea to solve this problem? Thank you

diouck avatar May 10 '22 23:05 diouck

next() use this

najmehn00 avatar Dec 06 '22 08:12 najmehn00

thank you evry thing is ok if you replace classes=None, by classes=['masks'], or classes=['images'],

image_generator = image_datagen.flow_from_directory(
    train_img_path,
    classes=['images'],
    class_mode = None,
    color_mode = 'rgb',
    batch_size = batch_size,
    seed = seed)

diouck avatar Dec 07 '22 15:12 diouck