nv-tlabs / GSCNN

Gated-Shape CNN for Semantic Segmentation (ICCV 2019)
https://nv-tlabs.github.io/GSCNN/
Other
915 stars 200 forks source link

Potential bugs for edge loss #62

Open hding2455 opened 4 years ago

hding2455 commented 4 years ago

Hi I found that your implementation of the edge loss in this code might has bug: In network/gscnn.py line 307, a sigmoid function is applied to cs to generate edge_out edge_out = self.sigmoid(cs) and in loss.py line 91 function binary_cross_entropy_with_logits is applied to compute the edge loss which has a sigmoid function build in it. which means you might have applied 2 sigmoid function for edge out to compute edge loss. loss = F.binary_cross_entropy_with_logits(log_p, target_t, weight, size_average=True)

If I made mistakes about this please correct me and let me know.