本文介绍了CTC丢失错误InvalidArgumentError:没有足够的时间进行目标转换序列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

CTC丢失错误InvalidArgumentError:没有足够的时间进行目标转换序列

CTC LOSS ERROR InvalidArgumentError: Not enough time for target transition sequence

推荐答案

您的真实(GT)文本太长.您的CTC损失函数输入矩阵的时间轴的长度为T.您的GT文字不得长于T.示例:输入矩阵的长度为4,您的GT文本为长度为5的世界",则矩阵无法包含此文本,因为它最多可以编码4个字符.

your ground-truth (GT) text is too long.Your input matrix for the CTC loss function has a time-axis with length T. Your GT text must not be longer than T.Example: input matrix has length 4, your GT text is "world" with length 5, then there is no way that the matrix can contain this text, because it can encode at most 4 chars.

如果GT文本包含重复的字符(如pi zz a中的字符),则CTC算法必须在两者之间插入一个特殊字符(空白),并且您允许的GT长度甚至会减少1.有关CTC损失的更多信息: https://medium.com/@ harald_scheidl/直观理解的连接主义的时间分类3797e43a86c

If the GT text contains duplicate chars (like in pizza), then the CTC algorithm must insert a special character (blank) in between, and your allowed GT length even decreases by 1.Some more information about CTC loss: https://medium.com/@harald_scheidl/intuitively-understanding-connectionist-temporal-classification-3797e43a86c

您应该检查每个样本的CTC输入长度和GT文本的长度(并说明重复的字符!),然后应该容易识别出导致此错误的原因.

You should check the CTC input length and the length of the GT text (and account for duplicate chars!) for each sample, then it should be easy to identify the one causing this error.

这篇关于CTC丢失错误InvalidArgumentError:没有足够的时间进行目标转换序列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-23 11:30
查看更多