Open RobertXiaobinW opened 3 years ago
博主,我试了把学习率调小和batch_size调小,但还是无法解决这个问题,是ctc_loss本身出现了什么问题吗? 这个是loss:tensor(inf, device='cuda:0', grad_fn = '<' MeanBackward0 '>' ) 这个是input_length: tensor([1, 1, 1, 1, 1, 1, 1, 1]) 这个是target_length: tensor([18, 9, 17, 6, 20, 11, 15, 13]) 这个是target: tensor([[ 788, 12398, 16864, 10277, 27893, 26725, 11970, 12494, 24441, 12486, 651, 25194, 21985, 10739, 28449, 18115, 24168, 24136, 0, 0, 0, 0, 0, 0, 0, 0], [18490, 13217, 26361, 8336, 13865, 21787, 8350, 9127, 14206, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [21562, 11474, 8698, 8510, 26653, 98, 9792, 26585, 18390, 9982, 12594, 27589, 15995, 1506, 25033, 29164, 27935, 0, 0, 0, 0, 0, 0, 0, 0, 0], [22313, 20842, 22277, 28439, 26443, 9748, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [30493, 20836, 25265, 23656, 24147, 15982, 27451, 28809, 28860, 11399, 16812, 8996, 17091, 27334, 10614, 16839, 28066, 15049, 21229, 21864, 0, 0, 0, 0, 0, 0], [14392, 28384, 12272, 22050, 13004, 16370, 19666, 8364, 47, 18037, 15336, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [25636, 16725, 755, 24788, 11787, 17582, 20783, 26430, 24712, 8278, 25356, 13494, 13120, 29164, 9054, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [24467, 10223, 13797, 9870, 17309, 28066, 14946, 14523, 10659, 8469, 27858, 9383, 19832, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]])
请问你解决了吗
博主,我试了把学习率调小和batch_size调小,但还是无法解决这个问题,是ctc_loss本身出现了什么问题吗? 这个是loss:tensor(inf, device='cuda:0', grad_fn = '<' MeanBackward0 '>' ) 这个是input_length: tensor([1, 1, 1, 1, 1, 1, 1, 1]) 这个是target_length: tensor([18, 9, 17, 6, 20, 11, 15, 13]) 这个是target: tensor([[ 788, 12398, 16864, 10277, 27893, 26725, 11970, 12494, 24441, 12486, 651, 25194, 21985, 10739, 28449, 18115, 24168, 24136, 0, 0, 0, 0, 0, 0, 0, 0], [18490, 13217, 26361, 8336, 13865, 21787, 8350, 9127, 14206, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [21562, 11474, 8698, 8510, 26653, 98, 9792, 26585, 18390, 9982, 12594, 27589, 15995, 1506, 25033, 29164, 27935, 0, 0, 0, 0, 0, 0, 0, 0, 0], [22313, 20842, 22277, 28439, 26443, 9748, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [30493, 20836, 25265, 23656, 24147, 15982, 27451, 28809, 28860, 11399, 16812, 8996, 17091, 27334, 10614, 16839, 28066, 15049, 21229, 21864, 0, 0, 0, 0, 0, 0], [14392, 28384, 12272, 22050, 13004, 16370, 19666, 8364, 47, 18037, 15336, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [25636, 16725, 755, 24788, 11787, 17582, 20783, 26430, 24712, 8278, 25356, 13494, 13120, 29164, 9054, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [24467, 10223, 13797, 9870, 17309, 28066, 14946, 14523, 10659, 8469, 27858, 9383, 19832, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]])