当前位置:网站首页>[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
边栏推荐
- 【2021年新书推荐】Red Hat Certified Engineer (RHCE) Study Guide
- 【动态规划】最长递增子序列
- 【点云系列】点云隐式表达相关论文概要
- 图像分类白盒对抗攻击技术总结
- Chapter 2 pytoch foundation 2
- 1.1 pytorch and neural network
- 1.2 preliminary pytorch neural network
- PyTorch最佳实践和代码编写风格指南
- Viewpager2 realizes Gallery effect. After notifydatasetchanged, pagetransformer displays abnormal interface deformation
- 素数求解的n种境界
猜你喜欢
Chapter 4 pytoch data processing toolbox
【点云系列】Pointfilter: Point Cloud Filtering via Encoder-Decoder Modeling
Machine learning III: classification prediction based on logistic regression
[2021 book recommendation] practical node red programming
PaddleOCR 图片文字提取
ThreadLocal, just look at me!
【点云系列】Learning Representations and Generative Models for 3D pointclouds
Bottom navigation bar based on bottomnavigationview
【点云系列】SO-Net:Self-Organizing Network for Point Cloud Analysis
第3章 Pytorch神经网络工具箱
随机推荐
【动态规划】最长递增子序列
PyTorch 模型剪枝实例教程三、多参数与全局剪枝
Pytorch trains the basic process of a network in five steps
Visual Studio 2019安装与使用
常见的正则表达式
Google AdMob advertising learning
Component learning (2) arouter principle learning
【点云系列】FoldingNet:Point Cloud Auto encoder via Deep Grid Deformation
PyTorch最佳实践和代码编写风格指南
PyTorch中的一些常见数据类型转换方法,与list和np.ndarray的转换方法
电脑关机程序
MySQL的安装与配置——详细教程
【动态规划】三角形最小路径和
【動態規劃】不同路徑2
1.2 preliminary pytorch neural network
Record WebView shows another empty pit
【点云系列】Learning Representations and Generative Models for 3D pointclouds
Bottom navigation bar based on bottomnavigationview
WebRTC ICE candidate里面的raddr和rport表示什么?
GEE配置本地开发环境