Tensorrt7: AttributeError: ‘NoneType‘ object has no attribute ‘create_execution_context‘
对于错误:
AttributeError: 'NoneType' object has no attribute 'create_execution_context'
在engine前添加以下两行
last_layer = network.get_layer(network.num_layers - 1)network.mark_output(last_layer.get_output(0))
这可能会继续引发以下错误
python: ../builder/Network.cpp:1205: virtual nvinfer1::ILayer* nvinfer1::Network::getLayer(int) const: Assertion `layerIndex >= 0' failed.
此处应该为trt7.0以上,只能使用explicitBatch flag set的原因,此处将建立build的代码进行修改
#第一行为添加的代码,然后注意,【把这个变量传入builder的创建里】explicit_batch = 1 << (int)(trt.NetworkDefinitionCreationFlag.EXPLICIT_BATCH)with trt.Builder(TRT_LOGGER) as builder, \builder.create_network(explicit_batch) as network, \trt.OnnxParser(network, TRT_LOGGER) as parser:
Tensorrt7: AttributeError: ‘NoneType‘ object has no attribute ‘create_execution_context‘相关推荐
- Traceback (most recent call last): File AttributeError: 'NoneType' object has no attribute 'group'
Traceback (most recent call last):File "<stdin>", line 1, in <module> Attribut ...
- Keras问题“AttributeError: 'NoneType' object has no attribute 'update”解决
BUG 在使用Keras训练模型时,在每个epoch完成后save_model时会报错 "AttributeError: 'NoneType' object has no attribute ...
- pyspark AttributeError: 'NoneType' object has no attribute 'setCallSite'
pyspark: AttributeError: 'NoneType' object has no attribute 'setCallSite' 我草,是pyspark的bug.解决方法: prin ...
- Pywinauto 应用后端类型选择错误:AttributeError: ‘NoneType‘ object has no attribute ‘backend‘. 原因及解决办法
AttributeError: 'NoneType' object has no attribute 'backend'. 错误原因: 选择的应用后端类型不对. windows 上应用的后端类型有两种 ...
- 成功解决AttributeError: ‘NoneType‘ object has no attribute ‘shape‘
成功解决AttributeError: 'NoneType' object has no attribute 'shape' 目录 解决问题 解决思路 解决方法 解决问题 multiplier = [ ...
- 成功解决AttributeError: 'NoneType' object has no attribute '__array_interface__'
成功解决AttributeError: 'NoneType' object has no attribute '__array_interface__' 目录 解决问题 解决思路 解决方法 原因及思路 ...
- AttributeError: 'NoneType' object has no attribute 'grid'报错解决方案
1问题描述: 当我们在使用tkinter时经常遇到AttributeError: 'NoneType' object has no attribute 'grid'的报错 2.原因分析: import ...
- Python学习笔记:‘’AttributeError: NoneType object has no attribute‘’
前言 最近在学习python,犯了很多低级错误,总结一下 目录 文章目录 前言 目录 问题 出处 方案 问题 AttributeError: 'NoneType' object has no attr ...
- 解决AttributeError AttributeError: 'NoneType' object has no attribute 'filename'
原因忘记上传文件 表单需要加属性 enctype="multipart/form-data" 否则报错!AttributeError AttributeError: 'NoneTy ...
最新文章
- OGRE 2.1 Windows 编译
- 都2020年,开发制作微信小程序商城,需要准备什么资料?应该不会不知道吧!
- plotly基于dataframe数据绘制柱状图(bar plot)
- 面试 -- ListView对其指定的子Item进行单独的刷新
- 【Win 10 应用开发】UI Composition 札记(二):基本构件
- AMD CPU 看清楚
- Java: for(;;) vs. while(true)
- html js倒计时不准确,js倒计时代码:第2个倒计时为什么会不正常?
- php7.2连接mysql8_兼容 php 7.2 及 mysql 8
- 增强SEO的div+css命名规则
- 诺基亚E72_RM-530刷机包023.002版
- 网页设计基础知识总结
- 安卓模拟器怎么切换IP地址
- 韩顺平JAVA学习笔记(入门自用)
- Python模块化编程
- 大数据推荐系统算法(3) 用户画像
- 基于Android手机酒店客房预订系统
- 英特尔携手生态伙伴亮相InfoComm,赋能协作办公迈向智能时代
- ‘adb‘ 不是内部或外部命令,也不是可运行的程序 或批处理文件。
- python中怎么打印出表格_Python 表格打印
热门文章
- Android传感器模拟器,如何为Android构建传感器模拟器?
- factorymenu什么意思_宏基20lsquo;显示屏AUTO和MENU是什么意思,在什么位置_已解决 - 阿里巴巴生意经...
- 任秀计算机音乐,重磅丨15家主流媒体聚焦全球音乐院校校长交流季
- oppo面经-java开发
- 本机不装Oracle,使用plsql连接远程Oracle的方法
- YOLO算法的ZYNQ移植尝试(SDx方法、ARM部分)
- 完成课件中的动手动脑的或需要验证的相关内容。
- hiho_100_八数码
- iis 5.0 不能运行 asp.net 的 原因
- 零基础带你学习MySQL—查询数据库(二)