使用TensorRT对caffe和pytorch onnx模型进行fp32和fp16推理
本文首发于个人博客 https://kezunlin.me/post/bcdfb73c/ ,欢迎阅读最新内容! tensorrt fp32 fp16 tutorial with caffe pytorch minist model Series Part 1: install and configure tensorrt 4 on ubuntu 16.04 Part 2: tensorrt fp32 fp16 tutorial Part 3: tensorrt int8 tutorial Code Example include headers #include <assert.h> #include <sys/stat.h> #include <time.h> #include <iostream> #include <fstream> #include <sstream> #include <iomanip> #include <cmath> #include <algorithm> #include <cuda_runtime_api.h> #include "NvCaffeParser.h" #include "NvOnnxConfig.h" #include "NvOnnxParser.h" #include "NvInfer.h" #include "common.h"