![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
tensorrt
文章平均质量分 57
Mr.Q
纸上得来终觉浅,绝知此事要躬行。 ---陆游
展开
-
tensorrt debug问题汇总
tensorrt debug汇总原创 2022-12-21 18:02:00 · 910 阅读 · 0 评论 -
onnx节点类型对应的TensorRT api
以resnet18为例。1. input节点细则:// const char* INPUT_BLOB_NAME = "data";// static const int INPUT_H = 224;// static const int INPUT_W = 224;// DataType dt = DataType::kFLOAT// Create input tensor of shape { 3, INPUT_H, INPUT_W } with name INPUT_BL原创 2021-07-27 13:37:00 · 984 阅读 · 0 评论 -
网络搭建-tensorRT c++ api和python pytorch api的对比
以lenet5为例(2个卷积 + 3个全连接层)。1.Python api (pytorch) def __init__(self): super(Lenet5, self).__init__() self.conv1 = nn.Conv2d(1, 6, kernel_size=5, stride=1, padding=0) self.pool1 = nn.AvgPool2d(kernel_size=2, stride=2, padding=原创 2021-07-22 16:19:15 · 702 阅读 · 0 评论 -
TensorRT C++ api创建输入层、卷积层、池化层、激活层、全连接层
以lenet5网络为例。1.首先要生成builder,再生成network,用network搭建网络结构。static Logger gLogger;IBuilder* builder = createInferBuilder(gLogger);// kEXPLICIT_BATCH = 0, //!< Mark the network to be an explicit batch network// With dynamic shapes, any of the input di原创 2021-07-22 15:02:06 · 1154 阅读 · 3 评论 -
使用cuda和tensorrt加速对比-C++部署pytorch模型
1.网络模型和数据SSD网络,图片大小(w,h)=(480, 640)SSD检测结果2.cuda加速处理一张图片的时间[ 0 ] 695.201 ms.[ 1 ] 42.9589 ms.[ 2 ] 42.2552 ms.[ 3 ] 40.0333 ms.[ 4 ] 40.5067 ms.[ 5 ] 42.2043 ms.[ 6 ] 42.2497 ms.[ 7 ] 43.8587 ms.[ 8 ] 41.9123 ms.[ 9 ] 42.1796 ms.[ 10原创 2021-05-05 09:47:02 · 2175 阅读 · 0 评论 -
ubuntu 编译onnxruntime源码
编译成功截图:1.拉取源码# clone指定分支 发布版1.7.2git clone -b rel-1.7.2 https://github.com/microsoft/onnxruntime.git# 拉取子项目git submodule update --init --recursive拉取子项目非常耗时,可以点击下面的子项目链接,下载下来,再解压复制到对应的目录中检查是否还有子类项目需要拉取:git submodule update --init --rec.原创 2021-04-29 14:55:24 · 3334 阅读 · 0 评论