W tensorflow/core/util/ctc/ctc_loss_calculator.cc:144] No valid path found 或 loss:inf的解决方案
基于Tensorflow和Keras实现端到端的不定长中文字符检测和识别(文本检测:CTPN,文本识别:DenseNet + CTC),在使用自己的数据训练这个模型的过程中,出现如下错误,由于问题已经解决,当时的出现的问题又没有截图保存,错误又不好复现,所以只能在网上找一张截图下来。

经过查找相关资料,都是说CTC在计算loss时要求输入序列长度不小于标签长度,但是不太懂这句话啥意思。
最终在https://github.com/YCG09/chinese_ocr/issues/15这个链接下和下面这个图片发现了灵感,错误的原因就是训练数据集的label的长度太长了,导致出现loss:inf错误

解决方法:首先在/train/train.py文件下改下这行代码(不一定需要和下方对应)
maxlabellength = 10
然后自己把训练数据集里面label长度大于10的数据删掉(有可能不一定都是10,主要是我这个数据集把label长度大于10的数据删掉对整个数据集影响不大)。这样就不会报错了,如下所示。

如此,问题成功解决。
W tensorflow/core/util/ctc/ctc_loss_calculator.cc:144] No valid path found 或 loss:inf的解决方案的更多相关文章
- W tensorflow/core/platform/cpu_feature_guard.cc:45]
W tensorflow/core/platform/cpu_feature_guard.cc:] The TensorFlow library wasn't compiled to use SSE3 ...
- 2019-09-16 16:42:03.621946: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA Traceback (most recent cal
-- ::] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA ...
- 代码详解:TensorFlow Core带你探索深度神经网络“黑匣子”
来源商业新知网,原标题:代码详解:TensorFlow Core带你探索深度神经网络“黑匣子” 想学TensorFlow?先从低阶API开始吧~某种程度而言,它能够帮助我们更好地理解Tensorflo ...
- tensorflow core 核心目标依赖图
Tensorflow的核心代码在core模块中,56w行的代码量让人望而生畏,熟悉了bazel工具之后,发现BUILD文件是理清代码结构的很好的资源,但使用bazel query语法提取出来//ten ...
- I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
遇到了这个问题,意思是你的 CPU 支持AVX AVX2 (可以加速CPU计算),但你安装的 TensorFlow 版本不支持 解决:1. 如果是初学者 或者 没有太大计算速度的需求,在开头加上这两行 ...
- tensorflow/core/kernels/conv_ops.cc:659] check failed: stream->parent()->getc
tensorflow版本与cudnn版本不对应,如tensorflow-gpu==1.1.0,cudnn==6.0 升级tensorflow-gpu到更高版本
- I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
问题: 安装TensorFlow(CPU版本),使用pip install tensorflow安装,安装一切顺利,但是在跑一个简单的程序时,遇到如下情况: 大概意思是:你的CPU支持AVX扩展,但是 ...
- 解决 warning I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
只需要加载如下代码: import os os.environ['
- I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA 问题
临时解决版本进入python后只需下面命令 import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
随机推荐
- RabbitMQ启动报unknown exchange type 'x-delayed-message'
RabbitMQ延迟队列插件未安装,导致以下问题: ShutdownSignalException: connection error; protocol method: #method<con ...
- 5.如何基于 dubbo 进行服务治理、服务降级、失败重试以及超时重试?
作者:中华石杉 面试题 如何基于 dubbo 进行服务治理.服务降级.失败重试以及超时重试? 面试官心理分析 服务治理,这个问题如果问你,其实就是看看你有没有服务治理的思想,因为这个是做过复杂微服务的 ...
- Skyshop.代码解析
MarmosetInput.cginc: Input结构定义: struct Input { #if defined(MARMO_PACKED_UV) || defined(MARMO_PACKED_ ...
- http异步通信
get 请求1)创建一个XMLHttpRequest对象2)调用该对象的open方法3)如果是get请求,设置回调函数onreadystatechange = callback4)Send如果是pos ...
- Flask框架整理及配置文件
阅读目录 Flask目录结构(蓝图) pro_flask包的init.py文件, 用于注册所有的蓝图 manage.py文件,作为整个项目的启动文件 views包中的blog.py,必须要通过sess ...
- cookie 用户认证
客户端浏览器上的一个文件 可认为是键值对集合 基于浏览器的功能 可以实现一个用户验证的功能 因为要在页面上显示当前用户的信息 修改 写index urls 运行直接输入index时 会自动进入lo ...
- luoguP3704 [SDOI2017]数字表格
题意 默认\(n\leqslant m\) 所求即为:\(\prod\limits_{i=1}^n\prod\limits_{j=1}^mf[\gcd(i,j)]\) 枚举\(\gcd(i,j)\)变 ...
- leetcode138. 复制带随机指针的链表
思路一:哈希 借助哈希保存节点信息. 代码 时间复杂度:O(n)空间复杂度:O(n) class Solution{ public: Node* copyRandomList(Node* head) ...
- Python进阶-VII 内置函数
一.内置函数引入 我们已经了解的有; print() input() range() next() dir() str() int() list() set() tuple() dict() he ...
- c#中几种数据结构
数组型: Array:内存连续分配,长度不可变,可索引访问. ArrayList:早期版本使用,非泛型,类型不安全,如果元素数据类型不同可考虑使用. List<>:泛型,可变长度,内存连续 ...