idstcv / DR_loss

PyTorch Implementation for DR Loss
Apache License 2.0
110 stars 15 forks source link

Losses are abnormal #2

Closed poodarchu closed 4 years ago

poodarchu commented 4 years ago

after training the model as stated in readme, the classification loss is only about 0.009, and regression loss is about 1.0 at the beginning.

qian-qi commented 4 years ago

Please check your environment. The classification loss should be about 2 after initialization. It is directly from 4xlog(1+exp(6x0.5))/6=2.03. After training, the classification loss should be similar to the regression loss.

poodarchu commented 4 years ago

image

poodarchu commented 4 years ago

image

I think it doesn't have relationship with the environment. and the modification is simple. So I think maybe you miss some details?

qian-qi commented 4 years ago

I find a potential problem in your code. The normalization term is from focal loss and we don't have it for the dr loss. Screen Shot 2020-04-14 at 20 35 36

poodarchu commented 4 years ago

ok thanks.