end2end-all-conv
end2end-all-conv copied to clipboard
StopIteration Error while training patches
Hi, I have sampled all the images to get the patches, and put them into the train, val, and test directory, each directory has three subdirectories: backround, benign and malignant patches. But when i run the sample_patches_main.py, i get the error. Can you help me solve the problem? Thanks a lot!
Here is the error:
Traceback (most recent call last):
File "patch_clf_train.py", line 313, in
In addition, ***/dm_keras_ext.py", line 304, hist = model.fit_generator( train_generator, steps_per_epoch=steps_per_epoch, epochs=nb_epoch, class_weight=class_weight, validation_data=validation_set, validation_steps=validation_steps, callbacks=callbacks, nb_worker=nb_worker, pickle_safe=pickle_safe, verbose=2)
Well, you shall use sample_patches_combined.py.
Sorry, I have just made a mistake. The error was occured when I run patch_clf_train, not sample_patches_main. I have sampled both the mass and calc patches which divided into five categories: 'background', 'calc_mal', 'calc_ben', 'mass_mal', 'mass_ben'. But in the trainning model, It's divided into three classes: background, maligant, benign. Thus, I just combined the calc_mal and mass_mal to be malignant. It's the same as benign and background.
I am also confused about the number of categories in patch_clf_train.py, It seems that the number should be 5 according to the paper. Have you run through the patch_clf_train? @HbueSky
@ChaoLi977
Yeah!you are right, there are five categories in the paper, but from the code, the class_list=['background', 'malignant', 'benign'], my approach is to merge mass_mal and calc_mal together, and renamed as malignant. And then~ Here cames the point, it failed, haw-haw, I'm sorry, I'm not here to solve your problem, but to raise mine, I hope you can run it quickly and share your experience. The following is my running error, the sincerity anticipates your reply, thanks!
I am also confused about the number of categories in patch_clf_train.py, It seems that the number should be 5 according to the paper. Have you run through the patch_clf_train? @HbueSky
hy .... did u able to run the complete code file?