对于错误:

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. kafka streams_如何使用Kafka Streams实施更改数据捕获
  2. 写一个图片预览器(react-native),温习一下初中数学
  3. python编程100例画图-python 画图示例源码(Turtle Graphics)
  4. Linux下Tomcat添加为系统服务
  5. 用python+flask自己制作api(教程附源码)
  6. OpenCV形态转换Morphology Transformations
  7. WPF---Xaml中改变ViewModel的值
  8. Material design 色彩
  9. 双向链表逆置c语言,【C++】实现双向链表的所有操作,包括逆置双链表(三种方法)...
  10. 变频器输出功率_100米的深井泵,如何接变频器,怎样控制
  11. C# Winform 窗体美化(十、自定义窗体)
  12. 分享一篇竞品分析报告
  13. 苹果AirPods Max拼多多百亿补贴价来了:券后价3999元
  14. 2020运动相机推荐_2020年优秀户外运动相机推荐
  15. 超强1000个jquery极品插件!
  16. openstack运维实战系列(一)之keystone用户建立
  17. printk与syslog(至少在Redhat中是这样的)+Ubuntu下用最简单的读到/proc/kmsg
  18. 碳足迹计算器ios版总结
  19. 《白话大数据与机器学习》读书笔记1
  20. 北航计算机学院硕士培养方案,北航硕士研究生培养方案.doc

热门文章

  1. python操作注册表能干啥_转 python操作注册表模块_winreg
  2. python3提取字符串中的数字_如何在Python中从字符串中提取数字?
  3. 并不对劲的bzoj5340:loj2552:uoj399:p4564: [Ctsc2018]假面
  4. javascript - 你不容错过的es6模板写法
  5. 1.Spring框架入门
  6. Codeforces Round #465 (Div. 2) F. Fafa and Array
  7. C语言系列之自增自减运算符的用法(二)
  8. jqGrid时间转换
  9. 机器学习笔记 增强学习与马尔科夫模型(1)
  10. 《Java虚拟机原理图解》1.3、class文件里的訪问标志、类索引、父类索引、接口索引集合...