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