
108
Convert for TensorRT Model
8.1.4 Build
Options
Parameter
Description
--calib=<file>
Read INT8 calibration cache file, required if --int8
--explicitBatch
Use explicit batch sizes when building the engine (default = implicit)
--fp16
Enable fp16 mode (default = disabled)
--int8
Run in int8 mode. (default = disabled)
--maxBatch=<int>
Set max batch size and build an implicit batch engine. (default = 1)
--plugins=<file>
Plugin library (.so) to load (can be specified multiple times).
This is a customized plugin which contains unsupported layers.
Needs to be in CUDA code.
--saveEngine=<file> Save the TensorRT engine as <file>
--workspace=N
Set workspace size to N megabytes. (default = 16)
Set as big as possible for maximum converting speed.
8.2
Convert Tensorflow models
TensorRT does not support the Tensorflow model. The Tensorflow models must be converted to a UFF model or
an ONNX model.
8.2.1
Convert Tensorflow to UFF
For more details on converting a TensorFlow model stream to a UFF mode, refer to the official documentation at:
https://docs.nvidia.com/deeplearning/tensorrt/api/python_api/uff/uff.html
8.2.2
Convert Tensorflow to ONNX
For more details on converting a TensorFlow model stream to an ONNX mode, refer to the official documentation
at:
https://github.com/onnx/tensorflow-onnx
8.3 Samples
8.3.1
Convert Yolov3.onnx to FP32 or FP16 engine file
Follow this link to convert yolo to onnx:
avt/tensorrt_demos/blob/master/yolo/yolo_to_onnx.py
More information can be found at:
https://github.com/jkjung-avt/tensorrt_demos/tree/master/yolo
8.3.1.1 FP32
Linux:
/usr/src/tensorrt/bin/trtexec --onnx=yolov3.onnx --workspace=3000
--maxBatch=4 --verbose --saveEngine=yolov3.engine
Windows:
trtexec.exe --onnx=yolov3.onnx --workspace=3000 --maxBatch=4 --
verbose --saveEngine=yolov3.engine
Summary of Contents for EVA SDK
Page 1: ...EVA SDK User s Manual Manual Rev 1 2 Revision Date July 20 2021 Part Number 50M 00010 1020...
Page 4: ...iv Preface This page intentionally left blank...
Page 8: ...4 Introduction This page intentionally left blank...
Page 10: ...6 Setting Environment Variables This page intentionally left blank...
Page 78: ...74 Image Processing Plugins This page intentionally left blank...
Page 110: ...106 Convert for OpenVINO Model This page intentionally left blank...