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

ctc_ent_loss_log函数和ctc_ent_loss函数

Open TongYoungG opened this issue 1 year ago • 1 comments

作者您好,我在您代码中发现了上述两个函数 "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"函数做了哪些变化吗,我读起来感觉具体的实现和论文中貌似有些不太一致。 谢谢,期待您的回复。

TongYoungG avatar May 10 '23 09:05 TongYoungG

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

liuhu-bigeye avatar May 11 '23 06:05 liuhu-bigeye