当前位置:网站首页>[8] Assertion failed: dims.nbDims == 4 || dims.nbDims == 5
[8] Assertion failed: dims.nbDims == 4 || dims.nbDims == 5
2022-04-23 06:12:00 【wujpbb7】
onnx 转 trt 的时候出现错误:
[04/22/2022-15:45:13] [W] [TRT] onnx2trt_utils.cpp:220: Your ONNX model has been generated with INT64 weights, while TensorRT does not natively support INT64. Attempting to cast down to INT32.
[04/22/2022-15:45:13] [E] [TRT] (Unnamed Layer* 371) [Shuffle]: at most one dimension may be inferred
ERROR: onnx2trt_utils.cpp:1517 In function scaleHelper:
[8] Assertion failed: dims.nbDims == 4 || dims.nbDims == 5
[04/22/2022-15:45:13] [E] Failed to parse onnx file
[04/22/2022-15:45:13] [E] Parsing model failed
[04/22/2022-15:45:13] [E] Engine creation failed
[04/22/2022-15:45:13] [E] Engine set up failed
按照 这篇文章,可以解决,但是需要升级 trt。
不升级 trt的解决方式是,重新编译 libnvonnxparser.so,替换 trtexec 使用的版本。
具体步骤是:(假设当前trt版本是7.2.1.6,被安装在/usr/local/TensroRT7.2.1.6)
1、下载
git clone -b 7.2.1 https://github.com/onnx/onnx-tensorrt.git
2、编译
cd onnx-tensorrt
git submodule update --init --recursive
mkdir build && cd build
cmake .. -DTENSORRT_ROOT=/usr/local/TensorRT-7.2.1.6 && make -j
3、用 ldd trtexec 看下它依赖的 libnvonnxparser.so 在哪,用新生成的相应文件替换即可。
参考:
版权声明
本文为[wujpbb7]所创,转载请带上原文链接,感谢
https://blog.csdn.net/blueblood7/article/details/124347486
边栏推荐
- Pytorch模型保存与加载(示例)
- torch_ Geometric learning 1, messagepassing
- 【点云系列】Multi-view Neural Human Rendering (NHR)
- PyTorch 模型剪枝实例教程三、多参数与全局剪枝
- c语言编写一个猜数字游戏编写
- The Cora dataset was trained and tested using the official torch GCN
- 【点云系列】Learning Representations and Generative Models for 3D pointclouds
- Android interview Online Economic encyclopedia [constantly updating...]
- ArcGIS license server administrator cannot start the workaround
- Gobang games
猜你喜欢

What did you do during the internship

【点云系列】PnP-3D: A Plug-and-Play for 3D Point Clouds

Chapter 1 numpy Foundation

1.2 初试PyTorch神经网络

winform滚动条美化

WebView displays a blank due to a certificate problem
Raspberry Pie: two color LED lamp experiment

微信小程序 使用wxml2canvas插件生成图片部分问题记录

Gephi教程【1】安装

C connection of new world Internet of things cloud platform (simple understanding version)
随机推荐
【点云系列】FoldingNet:Point Cloud Auto encoder via Deep Grid Deformation
Migrating your native/mobile application to Unified Plan/WebRTC 1.0 API
“Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated
MySQL notes 3_ Restraint_ Primary key constraint
图像分类白盒对抗攻击技术总结
Chapter 3 pytoch neural network toolbox
Google AdMob advertising learning
Keras如何保存、加载Keras模型
Component based learning (1) idea and Implementation
Raspberry Pie: two color LED lamp experiment
ArcGIS license server administrator cannot start the workaround
PyTorch 模型剪枝实例教程三、多参数与全局剪枝
[recommendation of new books in 2021] enterprise application development with C 9 and NET 5
【点云系列】Pointfilter: Point Cloud Filtering via Encoder-Decoder Modeling
Gephi tutorial [1] installation
[2021 book recommendation] artistic intelligence for IOT Cookbook
Visual studio 2019 installation and use
Android exposed components - ignored component security
【2021年新书推荐】Red Hat Certified Engineer (RHCE) Study Guide
Mysql database installation and configuration details