Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

接着预训练模型接着训练一直是inf? #27

Open
RobertXiaobinW opened this issue May 24, 2021 · 3 comments
Open

接着预训练模型接着训练一直是inf? #27

RobertXiaobinW opened this issue May 24, 2021 · 3 comments

Comments

@RobertXiaobinW
Copy link

有同学接着楼主的模型训练吗?为啥我训练后一直是INF呀。。。调小了学习率也没用。。。

@yizt
Copy link
Owner

yizt commented May 25, 2021

@RobertXiaobinW 您好,需要提供更详细的信息,最好是能够复现问题粒度

@RobertXiaobinW
Copy link
Author

RobertXiaobinW commented May 29, 2021

这个是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]])

是CTC方面出了问题么?

@GraceKafuu
Copy link

我从0开始训练也是inf,怎么解决

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants