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.
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.