liuhu
liuhu
Same error with above. @misolietavec solution fixed this problem. Hope that will be fixed in pip package later.
两种实现是等价的。序列很长的时候需要保证精度,带log是在log域计算的,不会被浮点数截断,精度更高一些
因为用pytorch实现,确实比c实现的warp_ctc要慢很多。文中Synth90k的结果,我们训练了一周左右。
作者已经毕业投身产业界,暂时没有改成c实现的计划。enctc在supplementary里提供了反向的公式,参照warp_ctc改起来不会很难。有需要欢迎讨论。
@Allenhu47 对比一下可以看到enctc的递归计算方式和ctc十分类似。 建议仔细读下warp-ctc的实现:https://github.com/SeanNaren/warp-ctc/blob/pytorch_bindings/include/detail/cpu_ctc.h#L189 然后把这部分python代码用类似的C实现(矩阵运算换成逐点计算):https://github.com/liuhu-bigeye/enctc.crnn/blob/master/pytorch_ctc/ctc_ent.py#L82 最后根据enctc在supplementary中的反向公式,用C实现backward。