savinay95n / PatchRefineNet

Improving Binary Segmentation by Incorporating Signals from Optimal Patch-wise Binarization
https://arxiv.org/pdf/2211.06560.pdf
GNU General Public License v3.0
7 stars 2 forks source link

A bug occurred when training the network to calculate loss #3

Open 1287217526 opened 7 months ago

1287217526 commented 7 months ago

In src/deepglobe/refine-models/train.py, the code for calculating the loss is written as rst_loss = loss_rst(y1, pred) reg_loss = loss_orig(y2, pred) From the definition of loss, the positions of y and pred should be swapped, otherwise it will lead to loss calculation errors or even nan situations