motokimura / PyTorch_Gaussian_YOLOv3

PyTorch implementation of Gaussian YOLOv3 (including training code for COCO dataset)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Got NaN loss when use the Gaussian idea to regression TASK.

FunkyKoki opened this issue · comments

Got NaN loss when use the Gaussian idea to regression TASK.

So sorry, I press 'Enter' just now.
I want to apply the Gaussian idea into my regression task, but I cannot solve the NaN problem.
I used the Gradient Clip and small learning rate, it changed nothing but decayed the time the NaN came out.
So, will the Gaussian loss xy be negative when you train the Gaussian model?

Anyway, thanks for your great work~

Hi, @FunkyKoki.
Introducing sigma_const parameter may work.
You need to modify YOLOLayer class to do that (just add sigma_const to predicted uncertainties when compute gaussian losses).
jwchoi384/Gaussian_YOLOv3#40

So, will the Gaussian loss xy be negative when you train the Gaussian model?

Yes. it goes to negative value but this is not a problem.

Thank you so much,with the sigma_const set, the training process becomes stable.
Hug you~ You save my life.