L4T Multimedia API Reference

27.1 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nvee_caffe_to_tensorrt_guide.md
Go to the documentation of this file.
1 Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved.
2 
3 @page nvee_caffe_to_tensorRT_group CAFFE to TensorRT Model Sample
4 @{
5 
6  - [Overview](#overview)
7  - [Key Structure and Classes](#key)
8  - [Command Line Options](#options)
9 
10 - - - - - - - - - - - - - - -
11 <a name="overview">
12 ## Overview ##
13 
14 TensorRT is an accelerated neural network inference engine and run-time library.
15 `ConvertCaffeToGieModel` is a standalone model conversion tool that converts a CAFFE
16 network to a TensorRT compatible model. This tool aims to run offline on the NVIDIA Jetson
17 platform and provides a cached TensorRT model stream to prevent subsequent repetitive
18 network conversion. Using this converted model, TensorRT-based applications can improve
19 greatly in accuracy and performance.
20 
21 If the source model changes (i.e., is retrained), the tool performs conversion again
22 to enable TensorRT accelerated inference.
23 
24 #### Prerequisites ####
25 Before running the sample, you must have the following:
26 
27 * TensorRT package
28 * A trained network
29 
30 - - - - - - - - - - - - - - -
31 <a name="key">
32 ## Key Structure and Classes ##
33 
34 The `CudaEngine` structure is a TensorRT interface that invokes the TensorRT function.
35 
36 The sample uses the following function:
37 
38 | Function | Description |
39 | ---------------- | ----------- |
40 | caffeToGIEModel | Uses TensorRT API to transfer a network model from CAFFE to TensorRT. |
41 
42 - - - - - - - - - - - - - - -
43 <a name="options">
44 ## Command Line Options ##
45 
46 To run the sample, execute:
47 
48  ConvertCaffeToGieModel -n <network_name> -l <model_name> -m <mode_name> -o <outBlob_name> [<outBlob_name>] -f <fp16 or fp32> -b <batch_size> -s <store_cache_name>
49 
50 Use the `-h` option to view the currently supported options.
51 
52 ### Example ####
53 
54 The following example shows a sample execution:
55 
56 @code
57  ./ConvertCaffeToGieModel -n ../../data/model/GoogleNet-modified.prototxt \
58  -l ../../data/model/GoogleNet-modified-online_iter_30000.caffemodel \
59  -m detection -o coverage,bboxes -f fp16 -b 2 \
60 @endcode
61 
62 @}
63