TensorRT caffemodel serialize序列化

 

1、TensorRT的需要的文件 
需要的基本文件(不是必须的) 
1>网络结构文件(deploy.prototxt) 
2>训练的权重模型(net.caffemodel) 
TensorRT 2.0 EA版中的sampleMNISTAPI和TensorRT 1.0中的sampleMNISTGIE 几乎没有变化,就是不使用caffemodel 文件构建network 的例子。 
2、TensorRT支持的层 
Convolution: 2D 
Activation: ReLU, tanh and sigmoid 
Pooling: max and average 
ElementWise: sum, product or max of two tensors 
LRN: cross-channel only 
Fully-connected: with or without bias 
SoftMax: cross-channel only 
Deconvolution 
对于TensorRT 不支持的层,可以先将支持的层跑完,然后将输出作为caffe的输入,用caffe再跑,V1不支持TensorRT 和caffe同时工作,V2支持。(例子NVIDIA正在做,后期可能会上传github) 
3、TensorRT 处理流程 
基本处理过程:1>caffe model 转化 gie的model,或者从磁盘或者网络加载gie可用的model;2>运行GIE引擎(数据提前copy到GPU中);3>提取结果

 

https://developer.nvidia.com/tensorrt

https://docs.nvidia.com/deeplearning/sdk/tensorrt-developer-guide/index.html

https://docs.nvidia.com/deeplearning/sdk/index.html

https://docs.nvidia.com/deeplearning/sdk/tensorrt-developer-guide/index.html#samples

https://www.cnblogs.com/bonelee/p/8311445.html

https://blog.csdn.net/xh_hit/article/details/82917948

https://blog.csdn.net/xh_hit/article/details/82918162

https://github.com/haoxurt/tensorRT_save_serialization

Serializing A Model In C++

 

posted on   鹅要长大  阅读(1566)  评论(0编辑  收藏  举报

编辑推荐:
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
阅读排行:
· 地球OL攻略 —— 某应届生求职总结
· 周边上新:园子的第一款马克杯温暖上架
· Open-Sora 2.0 重磅开源!
· 提示词工程——AI应用必不可少的技术
· .NET周刊【3月第1期 2025-03-02】

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

点击右上角即可分享
微信分享提示