当前位置:网站首页>[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
边栏推荐
- Visual studio 2019 installation and use
- torch. mm() torch. sparse. mm() torch. bmm() torch. Mul () torch The difference between matmul()
- 【点云系列】Pointfilter: Point Cloud Filtering via Encoder-Decoder Modeling
- Android exposed components - ignored component security
- Android interview Online Economic encyclopedia [constantly updating...]
- Exploration of SendMessage principle of advanced handler
- 【点云系列】Neural Opacity Point Cloud(NOPC)
- 三子棋小游戏
- 1.2 preliminary pytorch neural network
- 【点云系列】DeepMapping: Unsupervised Map Estimation From Multiple Point Clouds
猜你喜欢

ThreadLocal, just look at me!

【点云系列】 A Rotation-Invariant Framework for Deep Point Cloud Analysis

Machine learning II: logistic regression classification based on Iris data set

SSL/TLS应用示例

Component learning (2) arouter principle learning

【2021年新书推荐】Artificial Intelligence for IoT Cookbook

第8章 生成式深度学习

Chapter 2 pytoch foundation 1

Bottom navigation bar based on bottomnavigationview

MySQL数据库安装与配置详解
随机推荐
第1章 NumPy基础
【点云系列】Fully-Convolutional geometric features
torch.mm() torch.sparse.mm() torch.bmm() torch.mul() torch.matmul()的区别
Gee configuring local development environment
Chapter 1 numpy Foundation
如何对多维矩阵进行标准化(基于numpy)
[recommendation of new books in 2021] practical IOT hacking
Pytorch model pruning example tutorial III. multi parameter and global pruning
【点云系列】PnP-3D: A Plug-and-Play for 3D Point Clouds
机器学习 三: 基于逻辑回归的分类预测
1.2 preliminary pytorch neural network
torch. mm() torch. sparse. mm() torch. bmm() torch. Mul () torch The difference between matmul()
【2021年新书推荐】Red Hat Certified Engineer (RHCE) Study Guide
ArcGIS License Server Administrator 无法启动解决方法
[point cloud series] sg-gan: advantageous self attention GCN for point cloud topological parts generation
树莓派:双色LED灯实验
【点云系列】 A Rotation-Invariant Framework for Deep Point Cloud Analysis
Keras如何保存、加载Keras模型
Machine learning II: logistic regression classification based on Iris data set
三子棋小游戏