nabsabraham / focal-tversky-unet

This repo contains the code for our paper "A novel focal Tversky loss function and improved Attention U-Net for lesion segmentation" accepted at IEEE ISBI 2019.
357 stars 72 forks source link

NAN or INF in Final LOSS #10

Closed Vaheed1990 closed 5 years ago

Vaheed1990 commented 5 years ago

Hi there, Thanks for sharing your code. I tried to apply your code to my datasets. However, I got very weird loss values (inf or nan). I used attn_reg model and apply focal loss for first three outputs and tversky_loss for final output. I am wondering to know that how can I resolve this issue. I checked my data and try to add gradient clipping to prevent the exploding gradient problem. But, non of them did not work out.

jiejiangd commented 5 years ago

Hi there, I try to reproduce your article and use the code intact, but the experimental results are quite different from the experimental results in the paper.I would like to ask if you have a complete implementation of this article, can you give some help?

model:attn_reg,loss:focal_tversky my results: DSC 0.748 Precision 0.860 Recall 0.752 results in article: DSC 0.804 Precision 0.829 Recall 0.817 Hope to get your help! thanks!

xiongjhang commented 1 year ago

Hi, did you solve this problem?