DFF icon indicating copy to clipboard operation
DFF copied to clipboard

Question about your loss function

Open lijing1996 opened this issue 5 years ago • 3 comments

Since the input of your loss function is the network output without sigmoid function, I find it difficult to understand your code. What are 'max val' and 'log weight' here? Is it different from the loss function in CASENet? Could you give me a brief explanation? Thanks a lot.

https://github.com/Lavender105/DFF/blob/b215d3c960ca6fcea7adffabfb34b60c3e5190bc/exps/losses/customize.py#L16-L43

lijing1996 avatar Sep 20 '19 13:09 lijing1996

Hi, @lijing1996
Any idea about this? I face the same question. The loss function is too hard to understand for me...

BrandonHanx avatar Dec 29 '20 05:12 BrandonHanx

Hi, @lijing1996 I guess this code clip was written from torch.nn.functional.binary_cross_entropy_with_logits, which takes advantage of the log-sum-exp trick for numerical stability.

BrandonHanx avatar Dec 30 '20 03:12 BrandonHanx

Hi all, in this Loss Function do you guys know what the pad_mask variable is? I thought the target would have one channel per Class. Whereas this functions suggests a pad_mask channel as well.

Thank you!

maopal avatar Oct 21 '21 20:10 maopal