CTC损失函数及其实现[1]

15 篇文章 4 订阅
4 篇文章 0 订阅

CTC损失函数及其实现[1]


本文主要讲解了CTC损失函数的主要原理以及介绍了目前该损失函数的各种实现.

简介

显示中许多序列学习任务需要从含噪声,并且未分割的输入数据中预测出标签序列. 例如,语音识别,需要将声学信号转录成单词。RNNs似乎是一种适合这种任务的强大的序列学习器,但是,由于需要预分割的训练数据,以及需要后处理,将RNNs的输出转换为标签序列,使得该方法的应用受到限制。参考文献[1]所提出的方法,就是为了解决上述存在的两个问题,即:直接训练RNNs来直接标注未分割的数据。

原理

核心思想:

The basic idea is to interpret the network outputs as a probability distribution overall possible label sequences, conditioned on a given input sequence. Given this distribution, an objective function can be derived that directly maximises the probabilities of the correct labellings. Since the objective function is differentiable, the network can then be trained with standard backpropagation through time(Werbos, 1990).

术语定义:

In what follows, we refer to the task of labelling unsegmented data sequences as temporal classification (Kadous, 2002), and to our use of RNNs for this purpose as connectionist temporal classification(CTC).
By contrast, we refer to the independent labelling of each time-step, or frame, of the input sequence as
framewise classification.

Temporal Classification
在这里插入图片描述

Label Error Rate
在这里插入图片描述
Connectionist Temporal Classification
在这里插入图片描述
From Network Outputs to Labellings
在这里插入图片描述
在这里插入图片描述

实现

由于这个损失函数确实有很广泛的应用,目前有很多机构都实现了这个函数,下面主要贴上各种开源实现.
1.百度
https://github.com/baidu-research/warp-ctc
2. Pytorch 1.0
https://pytorch.org/docs/master/nn.html#torch.nn.CTCLoss
3. SeanNaren
https://github.com/SeanNaren/warp-ctc

无论何种实现,使用的方式都很类似,参数都是一样的.

where T represents the number of timesteps in the input to CTC, L represents the length of the labels for each example, and A represents the alphabet size.

参考

[1] A. Graves et al.: Connectionist Temporal Classification: Labelling Unsegmented Sequence Data with Recurrent Neural Networks: https://www.cs.toronto.edu/~graves/icml_2006.pdf

  • 1
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值