liuhu-bigeye / enctc.crnn

Project for Connectionist Temporal Classification with Maximum Entropy Regularization.
MIT License
142 stars 40 forks source link

ctc_ent_loss_log函数和ctc_ent_loss函数 #16

Open TongYoungG opened 1 year ago

TongYoungG commented 1 year ago

作者您好,我在您代码中发现了上述两个函数 "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 commented 1 year ago

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