TensorRT
mikeyNa
这个作者很懒,什么都没留下…
展开
-
Tensorrt自定义算子实现步骤
这篇文章主要是用于记录tensorrt自定义算子的过程.这里采用的是torch2trt直接转换的方式.第一步在模型中造一个自定义的算子:import torchfrom torch.nn.modules import Moduledef do_custom_Relu(x): return torch.clamp(x,min=0.0)def do_custom_op_shift(x,bias): x = x.cpu().detach().numpy() x = x + b原创 2020-09-21 17:49:00 · 5575 阅读 · 1 评论 -
Tensorrt环境搭建
Tensorrt环境搭建环境安装python 3.6TensorRT 7.0.0.1https://developer.nvidia.com/nvidia-tensorrt-7x-downloadcd /path/to/TensorRT7.0.0.1pip install tensorrt-7.0.0.11-cp36-none-linux_x86_64.whlpytorch 1.6根据机器需求,下载匹配的pytorchcudnn 7.6https://developer.nvidia.原创 2020-07-01 15:20:24 · 945 阅读 · 0 评论