TensorRT
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
nvinfer1 Namespace Reference

The TensorRT API version 1 namespace. More...

Classes

class  Dims
 structure to define the dimensions of a tensor More...
 
class  DimsHW
 descriptor for two-dimensional spatial data More...
 
class  DimsCHW
 descriptor for data with one channel dimension and two spatial dimensions More...
 
class  DimsNCHW
 descriptor for data with one index dimension, one channel dimension and two spatial dimensions More...
 
class  Weights
 an array of weights used as a layer parameter More...
 
class  IHostMemory
 class to handle library allocated memory that is accessible to the user. More...
 
class  ITensor
 a tensor in a network definition More...
 
class  ILayer
 base class for all layer classes in a network definition More...
 
class  IConvolutionLayer
 a convolution layer in a network definition More...
 
class  IFullyConnectedLayer
 a fully connected layer in a network definition More...
 
class  IActivationLayer
 an Activation layer in a network definition More...
 
class  IPoolingLayer
 a Pooling layer in a network definition More...
 
class  ILRNLayer
 a LRN layer in a network definition More...
 
class  IScaleLayer
 a Scale layer in a network definition More...
 
class  ISoftMaxLayer
 a Softmax layer in a network definition More...
 
class  IConcatenationLayer
 a concatenation layer in a network definition More...
 
class  IDeconvolutionLayer
 a deconvolution layer in a network definition More...
 
class  IElementWiseLayer
 a elementwise layer in a network definition More...
 
class  IRNNLayer
 a RNN layer in a network definition More...
 
class  IOutputDimensionsFormula
 application-implemented inteface to compute layer output sizes More...
 
class  IPlugin
 plugin class for user-implemented layers More...
 
class  IPluginLayer
 layer type for plugins More...
 
class  IUnaryLayer
 layer that represents a unary operation More...
 
class  IPaddingLayer
 layer that represents a padding operation More...
 
struct  Permutation
 
class  IShuffleLayer
 layer type for shuffling data More...
 
class  INetworkDefinition
 a network definition for input to the builder More...
 
class  IProfiler
 application-implemented interface for profiling More...
 
class  IExecutionContext
 context for executing inference using an engine More...
 
class  ICudaEngine
 an engine for executing inference on a built network More...
 
class  IInt8Calibrator
 application-implemented interface for calibration More...
 
class  IInt8EntropyCalibrator
 
class  IInt8LegacyCalibrator
 
class  IBuilder
 builds an engine from a network definition More...
 
class  IPluginFactory
 plugin factory for deserialization More...
 
class  IRuntime
 allows a serialized engine to be deserialized More...
 
class  ILogger
 application-implemented logging interface for the builder, engine and runtime. More...
 

Enumerations

enum  DataType : int { DataType::kFLOAT = 0, DataType::kHALF = 1, DataType::kINT8 = 2 }
 the type of weights and tensors. More...
 
enum  DimensionType : int { DimensionType::kSPATIAL = 0, DimensionType::kCHANNEL = 1, DimensionType::kINDEX = 2, DimensionType::kSEQUENCE = 3 }
 the type of data encoded across this dimension More...
 
enum  LayerType : int {
  LayerType::kCONVOLUTION = 0, LayerType::kFULLY_CONNECTED = 1, LayerType::kACTIVATION = 2, LayerType::kPOOLING = 3,
  LayerType::kLRN = 4, LayerType::kSCALE = 5, LayerType::kSOFTMAX = 6, LayerType::kDECONVOLUTION = 7,
  LayerType::kCONCATENATION = 8, LayerType::kELEMENTWISE = 9, LayerType::kPLUGIN = 10, LayerType::kRNN = 11,
  LayerType::kUNARY = 12, LayerType::kPADDING = 13, LayerType::kSHUFFLE = 14
}
 the type values of layer classes More...
 
enum  ActivationType : int { ActivationType::kRELU = 0, ActivationType::kSIGMOID = 1, ActivationType::kTANH = 2 }
 enumerates the types of activation to perform in an activation layer. More...
 
enum  PoolingType : int { kMAX = 0, kAVERAGE = 1, kMAX_AVERAGE_BLEND = 2 }
 the type of pooling to perform in a pooling layer.
 
enum  ScaleMode : int { ScaleMode::kUNIFORM = 0, ScaleMode::kCHANNEL = 1, ScaleMode::kELEMENTWISE = 2 }
 controls how scale is applied in a Scale layer More...
 
enum  ElementWiseOperation : int {
  ElementWiseOperation::kSUM = 0, ElementWiseOperation::kPROD = 1, ElementWiseOperation::kMAX = 2, ElementWiseOperation::kMIN = 3,
  ElementWiseOperation::kSUB = 4, ElementWiseOperation::kDIV = 5, ElementWiseOperation::kPOW = 6
}
 enumerates the binary operations that may be performed by an ElementWise layer More...
 
enum  RNNOperation : int { RNNOperation::kRELU = 0, RNNOperation::kTANH = 1, RNNOperation::kLSTM = 2, RNNOperation::kGRU = 3 }
 enumerates the RNN operations that may be performed by an RNN layer More...
 
enum  RNNDirection : int { RNNDirection::kUNIDIRECTION = 0, RNNDirection::kBIDIRECTION = 1 }
 enumerates the RNN direction that may be performed by an RNN layer More...
 
enum  RNNInputMode : int { RNNInputMode::kLINEAR = 0, RNNInputMode::kSKIP = 1 }
 enumerates the RNN input modes that may occur with an RNN layer More...
 
enum  UnaryOperation : int {
  UnaryOperation::kEXP = 0, UnaryOperation::kLOG = 1, UnaryOperation::kSQRT = 2, UnaryOperation::kRECIP = 3,
  UnaryOperation::kABS = 4, UnaryOperation::kNEG = 5
}
 enumerates the binary operations that may be performed by an ElementWise layer More...
 
enum  CalibrationAlgoType : int { kLEGACY_CALIBRATION = 0, kENTROPY_CALIBRATION = 1 }
 version of calibration algorithm to use More...
 
enum  PluginType : int {
  PluginType::kFASTERRCNN = 0, PluginType::kNORMALIZE = 1, PluginType::kPERMUTE = 2, PluginType::kPRIORBOX = 3,
  PluginType::kSSDDETECTIONOUTPUT = 4, PluginType::kCONCAT = 5, PluginType::kPRELU = 6, PluginType::kYOLOREORG = 7,
  PluginType::kYOLOREGION = 8
}
 the type values for the various plugins More...
 

Functions

template<typename T >
int EnumMax ()
 maximum number of elements in an enumeration type
 
template<>
int EnumMax< DataType > ()
 maximum number of elements in DataType enum. More...
 
template<>
int EnumMax< DimensionType > ()
 maximum number of elements in DimensionType enum. More...
 
template<>
int EnumMax< LayerType > ()
 maximum number of elements in LayerType enum. More...
 
template<>
int EnumMax< ActivationType > ()
 maximum number of elements in ActivationType enum. More...
 
template<>
int EnumMax< PoolingType > ()
 maximum number of elements in PoolingType enum. More...
 
template<>
int EnumMax< ScaleMode > ()
 maximum number of elements in ScaleMode enum. More...
 
template<>
int EnumMax< ElementWiseOperation > ()
 maximum number of elements in ElementWiseOperation enum. More...
 
template<>
int EnumMax< RNNOperation > ()
 maximum number of elements in RNNOperation enum. More...
 
template<>
int EnumMax< RNNDirection > ()
 maximum number of elements in RNNDirection enum. More...
 
template<>
int EnumMax< RNNInputMode > ()
 maximum number of elements in RNNInputMode enum. More...
 
template<>
int EnumMax< UnaryOperation > ()
 maximum number of elements in ElementWiseOperation enum. More...
 
template<>
int EnumMax< CalibrationAlgoType > ()
 maximum number of elements in CalibrationAlgoType enum. More...
 
template<>
int EnumMax< ILogger::Severity > ()
 maximum number of elements in DataType enum. More...
 
template<>
int EnumMax< PluginType > ()
 maximum number of elements in PluginType enum. More...
 

Detailed Description

The TensorRT API version 1 namespace.

Enumeration Type Documentation

enum nvinfer1::ActivationType : int
strong

enumerates the types of activation to perform in an activation layer.

Enumerator
kRELU 

rectified linear activation

kSIGMOID 

sigmoid activation

kTANH 

TanH activation.

enum nvinfer1::CalibrationAlgoType : int
strong

version of calibration algorithm to use

enum CalibrationAlgoType

enum nvinfer1::DataType : int
strong

the type of weights and tensors.

Enumerator
kFLOAT 

FP32 format.

kHALF 

FP16 format.

kINT8 

INT8 format.

enum nvinfer1::DimensionType : int
strong

the type of data encoded across this dimension

Enumerator
kSPATIAL 

elements correspond to different spatial data

kCHANNEL 

elements correspond to different channels

kINDEX 

elements correspond to different batch index

kSEQUENCE 

elements correspond to different sequence values

enum nvinfer1::ElementWiseOperation : int
strong

enumerates the binary operations that may be performed by an ElementWise layer

See Also
IElementWiseLayer
Enumerator
kSUM 

sum of the two elements

kPROD 

product of the two elements

kMAX 

maximum of the two elements

kMIN 

minimum of the two elements

kSUB 

substract the second element from the first

kDIV 

divide the first element by the second

kPOW 

the first element to the power of the second element

enum nvinfer1::LayerType : int
strong

the type values of layer classes

See Also
ILayer::getType()
Enumerator
kCONVOLUTION 

Convolution layer.

kFULLY_CONNECTED 

Fully connected layer.

kACTIVATION 

Activation layer.

kPOOLING 

Pooling layer.

kLRN 

LRN layer.

kSCALE 

Scale Layer.

kSOFTMAX 

SoftMax layer.

kDECONVOLUTION 

Deconvolution layer.

kCONCATENATION 

Concatenation layer.

kELEMENTWISE 

Elementwise layer.

kPLUGIN 

Plugin layer.

kRNN 

RNN Layer.

kUNARY 

UnaryOp Operation Layer.

kPADDING 

Padding Layer.

kSHUFFLE 

Shuffle Layer.

enum nvinfer1::PluginType : int
strong

the type values for the various plugins

See Also
INvPlugin::getPluginType()
Enumerator
kFASTERRCNN 

FasterRCNN fused plugin (RPN + ROI pooling)

kNORMALIZE 

Normalize plugin.

kPERMUTE 

Permute plugin.

kPRIORBOX 

PriorBox plugin.

kSSDDETECTIONOUTPUT 

SSD DetectionOutput plugin.

kCONCAT 

Concat plugin.

kPRELU 

YOLO PReLU Plugin.

kYOLOREORG 

YOLO Reorg Plugin.

kYOLOREGION 

YOLO Region Plugin.

enum nvinfer1::RNNDirection : int
strong

enumerates the RNN direction that may be performed by an RNN layer

See Also
IRNNLayer
Enumerator
kUNIDIRECTION 

Network iterations from first input to last input.

kBIDIRECTION 

Network iterates from first to last and vice versa and outputs concatenated.

enum nvinfer1::RNNInputMode : int
strong

enumerates the RNN input modes that may occur with an RNN layer

See Also
IRNNLayer
Enumerator
kLINEAR 

Perform the normal matrix multiplication in the first recurrent layer.

kSKIP 

No operation is performed on the first recurrent layer.

enum nvinfer1::RNNOperation : int
strong

enumerates the RNN operations that may be performed by an RNN layer

Equation definitions: i - input gate o - output gate f - forget gate z - update gate r - reset gate c - cell gate h - hidden gate t - time step(t-1 means previous time step) Xi - input tensor W[izrfcoh] - W parameter weight matrices for the corresponding gates R[izrfcoh] - U parameter weight matrices for the corresponding gates Wb[izrfcoh] - W parameter bias vectors for the corresponding gates Rb[izrfcoh] - U parameter bias vectors for the corresponding gates ReLU(X) - max(X, 0) tanh - hyperbolic tangent of X sigmoid(X) - 1 / (1 + e^-X) [C|H] - Cell/Hidden state

  • Equations: kRELU
    • Ht = ReLU(WiXt + RiHt-1 + Wbi + Rbi) kTANH
    • Ht = TANH(WiXt + RiHt-1 + Wbi + Rbi) kLSTM
    • it = sigmoid(WiXt + RiHt-1 + Wbi + Rbi)
    • ft = sigmoid(WfXt + RfHt-1 + Wbf + Rbf)
    • ot = sigmoid(WoXt + RoHt-1 + Wbo + Rbo)
    • ct = tanh(WcXt + RcHt-1 + Wbc + Rbc)
    • C = f * Ct-1 + it * ct
    • H = ot * tanh(C) kGRU
    • zt = sigmoid(WzXt + RzHt-1 + Wbz + Rbz)
    • rt = sigmoid(WrXt + RrHt-1 + Wbr + Rbr)
    • ht = tanh(WhXt + rt *(RhHt-1 + Rbh) + Wbh)
    • H = (1 - zt) * ht + it * Ht-1
See Also
IRNNLayer
Enumerator
kRELU 

Single gate RNN w/ ReLU activation function.

kTANH 

Single gate RNN w/ TANH activation function.

kLSTM 

Four-gate LSTM network w/o peephole connections.

kGRU 

Three-gate network consisting of Gated Recurrent Units.

enum nvinfer1::ScaleMode : int
strong

controls how scale is applied in a Scale layer

See Also
IScaleLayer
Enumerator
kUNIFORM 

identical coefficients across all elements of the tensor

kCHANNEL 

per-channel coefficients

kELEMENTWISE 

elementwise coefficients

enum nvinfer1::UnaryOperation : int
strong

enumerates the binary operations that may be performed by an ElementWise layer

See Also
IElementWiseLayer
Enumerator
kEXP 

exponentiation

kLOG 

log (base e)

kSQRT 

square root

kRECIP 

reciprocal

kABS 

absolute value

kNEG 

negation

Function Documentation

template<>
int nvinfer1::EnumMax< ActivationType > ( )
inline

maximum number of elements in ActivationType enum.

See Also
ActivationType
template<>
int nvinfer1::EnumMax< CalibrationAlgoType > ( )
inline

maximum number of elements in CalibrationAlgoType enum.

See Also
DataType
template<>
int nvinfer1::EnumMax< DataType > ( )
inline

maximum number of elements in DataType enum.

See Also
DataType
template<>
int nvinfer1::EnumMax< DimensionType > ( )
inline

maximum number of elements in DimensionType enum.

See Also
DimensionType
template<>
int nvinfer1::EnumMax< ElementWiseOperation > ( )
inline

maximum number of elements in ElementWiseOperation enum.

See Also
ElementWiseOperation
template<>
int nvinfer1::EnumMax< ILogger::Severity > ( )
inline

maximum number of elements in DataType enum.

See Also
DataType
template<>
int nvinfer1::EnumMax< LayerType > ( )
inline

maximum number of elements in LayerType enum.

See Also
LayerType
template<>
int nvinfer1::EnumMax< PluginType > ( )
inline

maximum number of elements in PluginType enum.

See Also
PluginType
template<>
int nvinfer1::EnumMax< PoolingType > ( )
inline

maximum number of elements in PoolingType enum.

See Also
PoolingType
template<>
int nvinfer1::EnumMax< RNNDirection > ( )
inline

maximum number of elements in RNNDirection enum.

See Also
RNNDirection
template<>
int nvinfer1::EnumMax< RNNInputMode > ( )
inline

maximum number of elements in RNNInputMode enum.

See Also
RNNInputMode
template<>
int nvinfer1::EnumMax< RNNOperation > ( )
inline

maximum number of elements in RNNOperation enum.

See Also
RNNOperation
template<>
int nvinfer1::EnumMax< ScaleMode > ( )
inline

maximum number of elements in ScaleMode enum.

See Also
ScaleMode
template<>
int nvinfer1::EnumMax< UnaryOperation > ( )
inline

maximum number of elements in ElementWiseOperation enum.

See Also
ElementWiseOperation