crnn.pytorch icon indicating copy to clipboard operation
crnn.pytorch copied to clipboard

Why My CTC Loss is always Nan or Inf value?

Open hemanthyernagula opened this issue 4 years ago • 6 comments

While training the model at every epoch the loss is always a nan or inf value, I tried to debug but could not sort out. If anyone face this kind of issue please help me out.

image

hemanthyernagula avatar Oct 15 '20 07:10 hemanthyernagula

encounter the same question, ask for help

zuoyuwei avatar Apr 07 '21 08:04 zuoyuwei

Have you already solved the problem?

RobertXiaobinW avatar May 30 '21 08:05 RobertXiaobinW

I'm in the same situation. Have you solved it?

gittjob avatar Jul 09 '21 01:07 gittjob

No I did not

hemanthyernagula avatar Aug 06 '21 09:08 hemanthyernagula

Same problem

GraceKafuu avatar Aug 31 '21 01:08 GraceKafuu

if you use your own dataset:

  1. make sure all the labels are not empty
  2. make sure the length of the predicted sequence > 2 * length(label) + 1

Yuxiang1995 avatar Jan 10 '23 03:01 Yuxiang1995