MrGiovanni / UNetPlusPlus

[IEEE TMI] Official Implementation for UNet++
Other
2.26k stars 538 forks source link

dice_coef_loss and dice_coef do not match during runinng code #21

Open WMeixiang opened 5 years ago

WMeixiang commented 5 years ago

Hi, I am interested in the definition of Nest_Net() in Keras framework. I use your "def Nest_Net(img_rows, img_cols, color_type=1, num_class=1, deep_supervision=False)" for 2D segmentation, while my code nb_filter=[64, 128, 256, 512, 1024], because the data size I feed to network is [192, 256, 1], my code is also based on the keras framework, without using deep supervision, I use "1.0-dice_coef" as my loss, the gray value of my input data: images is in [0,1], mask belongs to {0,1}. Everything looks good, while I have no idea why the loss is greater than 1 during running the program. could you help me?