Mehrdad-Noori / Brain-Tumor-Segmentation

Attention-Guided Version of 2D UNet for Automatic Brain Tumor Segmentation
207 stars 37 forks source link

how to train the K-fold data #9

Closed 675492062 closed 3 years ago

675492062 commented 4 years ago

1)After runing the data_generator.py, we get data.hdf5 fold0_idx.npy fold1_idx.npy fold2_idx.npy fold3_idx.npy fold4_idx.npy 2) In the function train_model parameter brains_idx_dir, which is from config.py offen is configed as cfg['brains_idx_dir'] = '/data/BrastData/data/fold0_idx.npy' . after some eooches, we can get a log.txt ,a model.hdf5 && a fold-tensorboard in "/save/axial_fold0". Corresponding to ‘’fold1_idx.npy', I think we should continue the training from the checkpoint model of the traning and validation spliting dataset "fold0_idx.npy'. However ,the model is still saved in another separate folder,such as axial_fold0, axial_fold1... 3) After 30 epoches training corresponding to ‘’fold0_idx.npy' with respect to 'view axial',the val loss is still 0.8 more or less。

Mehrdad-Noori commented 4 years ago

If I understand your question correctly, you mean that we can use the weights of the model trained on previous fold as initial weights of the next model, and then perform training?

And about the value of the loss, I didn't face this issue and the model was trained perfectly. Are you using the same dataset?

675492062 commented 4 years ago

If I understand your question correctly, you mean that we can use the weights of the model trained on previous fold as initial weights of the next model, and then perform training?

And about the value of the loss, I didn't face this issue and the model was trained perfectly. Are you using the same dataset? Thank your relpy. 1) Yes,this is my idea what you understand. 2) It is using the same dataset brast2018.hdf5 ,which is generated from original brast2018 data by your data_generator.py code.