对于错误:

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‘相关推荐

  1. 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 ...

  2. Keras问题“AttributeError: 'NoneType' object has no attribute 'update”解决

    BUG 在使用Keras训练模型时,在每个epoch完成后save_model时会报错 "AttributeError: 'NoneType' object has no attribute ...

  3. pyspark AttributeError: 'NoneType' object has no attribute 'setCallSite'

    pyspark: AttributeError: 'NoneType' object has no attribute 'setCallSite' 我草,是pyspark的bug.解决方法: prin ...

  4. Pywinauto 应用后端类型选择错误:AttributeError: ‘NoneType‘ object has no attribute ‘backend‘. 原因及解决办法

    AttributeError: 'NoneType' object has no attribute 'backend'. 错误原因: 选择的应用后端类型不对. windows 上应用的后端类型有两种 ...

  5. 成功解决AttributeError: ‘NoneType‘ object has no attribute ‘shape‘

    成功解决AttributeError: 'NoneType' object has no attribute 'shape' 目录 解决问题 解决思路 解决方法 解决问题 multiplier = [ ...

  6. 成功解决AttributeError: 'NoneType' object has no attribute '__array_interface__'

    成功解决AttributeError: 'NoneType' object has no attribute '__array_interface__' 目录 解决问题 解决思路 解决方法 原因及思路 ...

  7. AttributeError: 'NoneType' object has no attribute 'grid'报错解决方案

    1问题描述: 当我们在使用tkinter时经常遇到AttributeError: 'NoneType' object has no attribute 'grid'的报错 2.原因分析: import ...

  8. Python学习笔记:‘’AttributeError: NoneType object has no attribute‘’

    前言 最近在学习python,犯了很多低级错误,总结一下 目录 文章目录 前言 目录 问题 出处 方案 问题 AttributeError: 'NoneType' object has no attr ...

  9. 解决AttributeError AttributeError: 'NoneType' object has no attribute 'filename'

    原因忘记上传文件 表单需要加属性 enctype="multipart/form-data" 否则报错!AttributeError AttributeError: 'NoneTy ...

最新文章

  1. OGRE 2.1 Windows 编译
  2. 都2020年,开发制作微信小程序商城,需要准备什么资料?应该不会不知道吧!
  3. plotly基于dataframe数据绘制柱状图(bar plot)
  4. 面试 -- ListView对其指定的子Item进行单独的刷新
  5. 【Win 10 应用开发】UI Composition 札记(二):基本构件
  6. AMD CPU 看清楚
  7. Java: for(;;) vs. while(true)
  8. html js倒计时不准确,js倒计时代码:第2个倒计时为什么会不正常?
  9. php7.2连接mysql8_兼容 php 7.2 及 mysql 8
  10. 增强SEO的div+css命名规则
  11. 诺基亚E72_RM-530刷机包023.002版
  12. 网页设计基础知识总结
  13. 安卓模拟器怎么切换IP地址
  14. 韩顺平JAVA学习笔记(入门自用)
  15. Python模块化编程
  16. 大数据推荐系统算法(3) 用户画像
  17. 基于Android手机酒店客房预订系统
  18. 英特尔携手生态伙伴亮相InfoComm,赋能协作办公迈向智能时代
  19. ‘adb‘ 不是内部或外部命令,也不是可运行的程序 或批处理文件。
  20. python中怎么打印出表格_Python 表格打印

热门文章

  1. Android传感器模拟器,如何为Android构建传感器模拟器?
  2. factorymenu什么意思_宏基20lsquo;显示屏AUTO和MENU是什么意思,在什么位置_已解决 - 阿里巴巴生意经...
  3. 任秀计算机音乐,重磅丨15家主流媒体聚焦全球音乐院校校长交流季
  4. oppo面经-java开发
  5. 本机不装Oracle,使用plsql连接远程Oracle的方法
  6. YOLO算法的ZYNQ移植尝试(SDx方法、ARM部分)
  7. 完成课件中的动手动脑的或需要验证的相关内容。
  8. hiho_100_八数码
  9. iis 5.0 不能运行 asp.net 的 原因
  10. 零基础带你学习MySQL—查询数据库(二)