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

ctc_ent_loss_log函数和ctc_ent_loss函数 #16

Open
TongYoungG opened this issue May 10, 2023 · 1 comment
Open

ctc_ent_loss_log函数和ctc_ent_loss函数 #16

TongYoungG opened this issue May 10, 2023 · 1 comment

Comments

@TongYoungG
Copy link

作者您好,我在您代码中发现了上述两个函数 "ctc_ent_loss_log" 和 “ctc_ent_loss”。从代码实现上,“ctc_ent_loss”更符合直观的认识。我在读"ctc_ent_loss_log"函数时有点吃力,以下是几个问题想请教您:
(1)您为什么选择"ctc_ent_loss_log"函数,是因为网络的output存在负项吗?
(2)能解释下"ctc_ent_loss_log"函数做了哪些变化吗,我读起来感觉具体的实现和论文中貌似有些不太一致。
谢谢,期待您的回复。

@liuhu-bigeye
Copy link
Owner

liuhu-bigeye commented May 11, 2023

两种实现是等价的。序列很长的时候需要保证精度,带log是在log域计算的,不会被浮点数截断,精度更高一些

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

2 participants