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++

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM