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 ...
最新文章
- kafka streams_如何使用Kafka Streams实施更改数据捕获
- 写一个图片预览器(react-native),温习一下初中数学
- python编程100例画图-python 画图示例源码(Turtle Graphics)
- Linux下Tomcat添加为系统服务
- 用python+flask自己制作api(教程附源码)
- OpenCV形态转换Morphology Transformations
- WPF---Xaml中改变ViewModel的值
- Material design 色彩
- 双向链表逆置c语言,【C++】实现双向链表的所有操作,包括逆置双链表(三种方法)...
- 变频器输出功率_100米的深井泵,如何接变频器,怎样控制
- C# Winform 窗体美化(十、自定义窗体)
- 分享一篇竞品分析报告
- 苹果AirPods Max拼多多百亿补贴价来了:券后价3999元
- 2020运动相机推荐_2020年优秀户外运动相机推荐
- 超强1000个jquery极品插件!
- openstack运维实战系列(一)之keystone用户建立
- printk与syslog(至少在Redhat中是这样的)+Ubuntu下用最简单的读到/proc/kmsg
- 碳足迹计算器ios版总结
- 《白话大数据与机器学习》读书笔记1
- 北航计算机学院硕士培养方案,北航硕士研究生培养方案.doc
热门文章
- python操作注册表能干啥_转 python操作注册表模块_winreg
- python3提取字符串中的数字_如何在Python中从字符串中提取数字?
- 并不对劲的bzoj5340:loj2552:uoj399:p4564: [Ctsc2018]假面
- javascript - 你不容错过的es6模板写法
- 1.Spring框架入门
- Codeforces Round #465 (Div. 2) F. Fafa and Array
- C语言系列之自增自减运算符的用法(二)
- jqGrid时间转换
- 机器学习笔记 增强学习与马尔科夫模型(1)
- 《Java虚拟机原理图解》1.3、class文件里的訪问标志、类索引、父类索引、接口索引集合...