SegAN icon indicating copy to clipboard operation
SegAN copied to clipboard

loss

Open hydxqing opened this issue 6 years ago • 3 comments

Why do my output loss_G and loss_D are opposite to each other? In your code, loss_G and loss_D are just symbols different. And after this training is completed, the predictions are all nan. Why is this so? I really hope to hear from you.

hydxqing avatar Nov 25 '18 07:11 hydxqing

Because the denominator may be 0 in the calculate of iou and dice, you can replace the np.mean() with np.nanmean().

douhe66 avatar May 15 '19 07:05 douhe66

I am also have a problem with the loss_G and loss_D, actually, I changed the symbol of the loss_D, but the results do not seem to differ. Is anyone could explain it?

douhe66 avatar May 15 '19 08:05 douhe66

This shouldn't be happening, maybe you can try to train with the adversarial loss alone (i.e., w/o the dice loss, which was put there to help stabilize the adversarial training). In that case, changing the symbol should just make the whole training fail.

YuanXue1993 avatar May 16 '19 18:05 YuanXue1993