pytorch-sgns icon indicating copy to clipboard operation
pytorch-sgns copied to clipboard

Confused by the loss function.

Open JinYang88 opened this issue 6 years ago • 2 comments

In your code, you minimized -(oloss + nloss).mean()

which means (oloss+nloss) should be large. So, "oloss become large and nloss become small " is expected.

Although -(oloss+nloss) decrease, I got oloss become small and nloss become large, how so?

JinYang88 avatar May 29 '18 08:05 JinYang88

Thank you for the feedback. Can you provide a reduced, reproducible case sample? Like, small dataset and a configuration for it.

theeluwin avatar May 30 '18 07:05 theeluwin

When computing nloss, the author uses function .neg to make the nloss smaller when training.

gongchenooo avatar May 08 '21 02:05 gongchenooo