Jit 报错TracingCheckError:ERROR: Graphs differed across invocations!
问题描述
使用Tinynn将Pytorch转化为tflite时报错:
发生异常: TracingCheckError (note: full exception trace is shown but execution is paused at: _run_module_as_main)
Tracing failed sanity checks!
ERROR: Graphs differed across invocations!
Graph diff:
graph(%self.1 : __torch__.model.Musicnn_NPU,
%x.1 : Tensor):
%dense2 : __torch__.torch.nn.modules.linear.Linear = prim::GetAttr[name="dense2"](%self.1)
.............
First diverging operator:
Node diff:
- %dense2 : __torch__.torch.nn.modules.linear.___torch_mangle_64.Linear = prim::GetAttr[name="dense2"](%self.1)
? ^
+ %dense2 : __torch__.torch.nn.modules.linear.___torch_mangle_143.Linear = prim::GetAttr[name="dense2"](%self.1)
?
这个错误是指追踪(Tracing)过程中的健全性检查(sanity checks)失败。
ERROR: Graphs differed across invocations!:错误表明在不同的调用(invocations)中,计算图(Graphs)不一致。
First diverging operator::指出了导致计算图出现差异的第一个操作符(operator)。
原因以及解决方法
模型中包含随机操作(如dropout或随机初始化),每次执行时可能会产生不同的结果,导致计算图不一致,如我使用的模型:
out = self.relu(self.bn(self.dense1(out)))
out = self.dropout(out)
out = self.dense2(out)
# out = nn.Sigmoid()(out)
# [ruihai.jing]module changed cause of quantized error--start
out = nn.functional.sigmoid(out)
第一个报错的层在self.dense2(out),因为上面有dropout操作,把这个操作注释掉就可以。
Jit 报错TracingCheckError:ERROR: Graphs differed across invocations!的更多相关文章
- JS function document.onclick(){}报错Syntax error on token "function", delete this token
JS function document.onclick(){}报错Syntax error on token "function", delete this token func ...
- 一个参数大小写引发的uploadify报错 "Syntax error, unrecognized expression: #"
上传控件uploadify 报错"Syntax error, unrecognized expression: #" 版本为 uploadify3.2 报错原因:参数ID[hi ...
- yum报错:Error: xz compression not available
测试服务器(centos6.5)经过一段时间的折腾,有一天在上面进行yum操作时突然出现下面的报错: Error: xz compression not available 最后经过一番排查,发现原因 ...
- yum报错: Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again
在Centos 5.x或6.x上安装RHEL EPEL Repo repository,资源库,源的意思.RHEL EPEL(Extra Packages for Enterprise Linux) ...
- redis报错Windows error 0x70(a large memory)
redis报错Windows error 0x70 redis 嫌弃你内存不够了,就给你不开第二个实例. The Windows version of Redis allocates a large ...
- ASSERT报错:error C2664: “AfxAssertFailedLine”: 不能将参数 1 从“TCHAR []”转换为“LPCSTR”
转载请注明来源:崨雁嫀筝 http://www.cnblogs.com/xuesongshu 这个错误是我在把tinyxml修改为宽字符(Unicode)版本时候遇到的问题,我首先按关键字把所有有ch ...
- 启动安卓模拟器报错 emulator: ERROR: x86_64 emulation currently requires hardware acceleration! CPU acceleration status:HAXM must be updated(version 1.1.1<6.0.1) 解决办法
启动安卓模拟器报错 emulator: ERROR: x86_64 emulation currently requires hardware acceleration! CPU accelerat ...
- sql查询语句报错处理——ERROR: failed to find conversion function from unknown to text
今天遇到写存储过程遇到的一个小问题,在查询语句中使用到了自定义的数当做列的值,然后想给这一列起一个别名 ,就直接在后面用了 as 别名.执行存储过程,存储过程报错,ERROR: failed to f ...
- SOAPtest报错:error occurred during initialization of vm解决方法
参考:http://forums.parasoft.com/index.php?act=ST&f=36&t=614 安装SOAPtest报错:error occurred during ...
- 安装 R 包报错 clang: error: unsupported option '-fopenmp' 的解决方法
MacOS 上安装 R 包 install.packages("data.table") 后面提示是否安装需要编译的版本: Do you want to install from ...
随机推荐
- Delphi 动态生成进度条窗体
在implementation加入下面 uses Gauges; var Gauge1: TGauge; 加入Timer1控件,设为false procedure TForm1.Button1Clic ...
- 【SpringCloud】SpringCloud Alibaba Seata处理分布式事务
SpringCloud Alibaba Seata处理分布式事务 分布式事务问题 分布式前 单机库存没这个问题 O(∩_∩)O 从1:1->1:N->N:N 分布式之后 单体应用被拆分成微 ...
- 基于C#的学生社团管理系统(简单基础版)
前言 该系统为个人独立编写测试,也算自己的孩子吧,虽然基础功能简单但是也为了大家能有个可以借鉴,可以改写的模版使用,我就写个博客让大家参考,但是拒绝搬运售卖. * 正式介绍 该系统基于C#开发,使用V ...
- 【教程】Windows10系统激活
Windows10系统激活 一.找一个激活码 到百度搜索,筛选发表日期在最近一个月或者一周之内的 二.以管理员身份打开cmd 按Win+R键,输入cmd打开命令行窗口 按Ctrl+Shift+Esc键 ...
- CoreOS 手动升级篇
说到升级...通常肯定会以下2个步骤: 检查是否有新版本. 下载和安装新版本. 在 CoreOS 中也一样,我们先来看下在 CoreOS 中对应的命令: # 检查是否有新版本 update_engin ...
- 3. RabbitMQ 的(Hello World) 和 RabbitMQ 的(Work Queues)工作队列
3. RabbitMQ 的(Hello World) 和 RabbitMQ 的(Work Queues)工作队列 @ 目录 3. RabbitMQ 的(Hello World) 和 RabbitMQ ...
- Jenkins pipeline之声明式的jenkinsfile
Jenkins pipeline之声明式的jenkinsfile 内置的关键字 pipeline : 是pipeline的跟节点 agent: 定义piple使用哪个账号在哪个机器上执行 post: ...
- .net WorkFlow 流程设计
WikeFlow官网:www.wikesoft.com WikeFlow学习版演示地址:workflow.wikesoft.com WikeFlow学习版源代码下载:https://gitee.com ...
- mybatis插入数据返回id的实现方式
一. useGeneratedKeys="true" <insert id="saveUser" parameterType="com.apcs ...
- 康谋分享 | 在基于场景的AD/ADAS验证过程中,识别挑战性场景!
基于场景的验证是AD/ADAS(自动驾驶和高级驾驶辅助)系统开发过程中的重要步骤,它包括对自动化系统进行一系列预定义场景的测试.测试中包含的场景越多,尤其挑战性场景越多,人们对正在测试的AD/ADAS ...