TensorRT  7.2.1.6
NVIDIA TensorRT
Looking for a C++ dev who knows TensorRT?
I'm looking for work. Hire me!
nvcaffeparser1 Namespace Reference

The TensorRT Caffe parser API namespace. More...

Classes

class  BinaryProtoBlob
 
class  BlobNameToTensor
 
class  CaffeParser
 
class  CaffeWeightFactory
 
class  IBinaryProtoBlob
 Object used to store and query data extracted from a binaryproto file using the ICaffeParser. More...
 
class  IBlobNameToTensor
 Object used to store and query Tensors after they have been extracted from a Caffe model using the ICaffeParser. More...
 
class  ICaffeParser
 Class used for parsing Caffe models. More...
 
class  IPluginFactory
 Plugin factory used to configure plugins. More...
 
class  IPluginFactoryExt
 Plugin factory used to configure plugins with added support for TRT versioning. More...
 
class  IPluginFactoryV2
 Plugin factory used to configure plugins. More...
 

Typedefs

typedef nvinfer1::ILayer *(* LayerParseFn) (nvinfer1::INetworkDefinition &, const trtcaffe::LayerParameter &, CaffeWeightFactory &, BlobNameToTensor &)
 

Enumerations

enum  WeightType {
  WeightType::kGENERIC = 0,
  WeightType::kBIAS = 1,
  WeightType::kMEAN = 0,
  WeightType::kVARIANCE = 1,
  WeightType::kMOVING_AVERAGE = 2,
  WeightType::kNVMEAN = 0,
  WeightType::kNVVARIANCE = 1,
  WeightType::kNVSCALE = 3,
  WeightType::kNVBIAS = 4
}
 

Functions

ICaffeParsercreateCaffeParser ()
 Creates a ICaffeParser object. More...
 
void shutdownProtobufLibrary ()
 Shuts down protocol buffers library. More...
 
bool checkBlobs (const trtcaffe::LayerParameter &msg, int bottoms, int tops)
 
nvinfer1::ILayerparseAbsVal (nvinfer1::INetworkDefinition &network, const trtcaffe::LayerParameter &msg, CaffeWeightFactory &, BlobNameToTensor &tensors)
 
nvinfer1::ILayerparseBatchNormalization (nvinfer1::INetworkDefinition &network, const trtcaffe::LayerParameter &msg, CaffeWeightFactory &weightFactory, BlobNameToTensor &tensors)
 
nvinfer1::ILayerparseBNLL (nvinfer1::INetworkDefinition &network, const trtcaffe::LayerParameter &msg, CaffeWeightFactory &, BlobNameToTensor &tensors)
 
nvinfer1::ILayerparseClip (nvinfer1::INetworkDefinition &network, const trtcaffe::LayerParameter &msg, CaffeWeightFactory &, BlobNameToTensor &tensors)
 
nvinfer1::ILayerparseConcat (nvinfer1::INetworkDefinition &network, const trtcaffe::LayerParameter &msg, CaffeWeightFactory &, BlobNameToTensor &tensors)
 
nvinfer1::ILayerparseConvolution (nvinfer1::INetworkDefinition &network, const trtcaffe::LayerParameter &msg, CaffeWeightFactory &weightFactory, BlobNameToTensor &tensors)
 
nvinfer1::ILayerparseCrop (nvinfer1::INetworkDefinition &network, const trtcaffe::LayerParameter &msg, CaffeWeightFactory &, BlobNameToTensor &tensors)
 
nvinfer1::ILayerparseDeconvolution (nvinfer1::INetworkDefinition &network, const trtcaffe::LayerParameter &msg, CaffeWeightFactory &weightFactory, BlobNameToTensor &tensors)
 
nvinfer1::ILayerparseEltwise (nvinfer1::INetworkDefinition &network, const trtcaffe::LayerParameter &msg, CaffeWeightFactory &, BlobNameToTensor &tensors)
 
nvinfer1::ILayerparseELU (nvinfer1::INetworkDefinition &network, const trtcaffe::LayerParameter &msg, CaffeWeightFactory &, BlobNameToTensor &tensors)
 
nvinfer1::ILayerparseInnerProduct (nvinfer1::INetworkDefinition &network, const trtcaffe::LayerParameter &msg, CaffeWeightFactory &weightFactory, BlobNameToTensor &tensors)
 
nvinfer1::ILayerparseLRN (nvinfer1::INetworkDefinition &network, const trtcaffe::LayerParameter &msg, CaffeWeightFactory &, BlobNameToTensor &tensors)
 
nvinfer1::ILayerparsePermute (nvinfer1::INetworkDefinition &network, const trtcaffe::LayerParameter &msg, CaffeWeightFactory &, BlobNameToTensor &tensors)
 
nvinfer1::ILayerparsePooling (nvinfer1::INetworkDefinition &network, const trtcaffe::LayerParameter &msg, CaffeWeightFactory &, BlobNameToTensor &tensors)
 
nvinfer1::ILayerparsePower (nvinfer1::INetworkDefinition &network, const trtcaffe::LayerParameter &msg, CaffeWeightFactory &weightFactory, BlobNameToTensor &tensors)
 
nvinfer1::ILayerparsePReLU (nvinfer1::INetworkDefinition &network, const trtcaffe::LayerParameter &msg, CaffeWeightFactory &weightFactory, BlobNameToTensor &tensors)
 
nvinfer1::ILayerparseReduction (nvinfer1::INetworkDefinition &network, const trtcaffe::LayerParameter &msg, CaffeWeightFactory &weightFactory, BlobNameToTensor &tensors)
 
nvinfer1::ILayerparseReLU (nvinfer1::INetworkDefinition &network, const trtcaffe::LayerParameter &msg, CaffeWeightFactory &, BlobNameToTensor &tensors)
 
nvinfer1::ILayerparseReshape (nvinfer1::INetworkDefinition &network, const trtcaffe::LayerParameter &msg, CaffeWeightFactory &, BlobNameToTensor &tensors)
 
nvinfer1::ILayerparseScale (nvinfer1::INetworkDefinition &network, const trtcaffe::LayerParameter &msg, CaffeWeightFactory &weightFactory, BlobNameToTensor &tensors)
 
nvinfer1::ILayerparseSigmoid (nvinfer1::INetworkDefinition &network, const trtcaffe::LayerParameter &msg, CaffeWeightFactory &, BlobNameToTensor &tensors)
 
nvinfer1::ILayerparseSoftMax (nvinfer1::INetworkDefinition &network, const trtcaffe::LayerParameter &msg, CaffeWeightFactory &, BlobNameToTensor &tensors)
 
nvinfer1::ILayerparseTanH (nvinfer1::INetworkDefinition &network, const trtcaffe::LayerParameter &msg, CaffeWeightFactory &, BlobNameToTensor &tensors)
 
template<typename T >
bool bnConvertWrap (float scaleFactor, const Weights &variance, const Weights &mean, const Weights &scaleBlob, const Weights &biasBlob, Weights &shift, Weights &scale, float eps, bool nvCaffe, CaffeWeightFactory &weightFactory)
 
bool readBinaryProto (trtcaffe::NetParameter *net, const char *file, size_t bufSize)
 
bool readTextProto (trtcaffe::NetParameter *net, const char *file)
 

Variables

static std::unordered_map< std::string, LayerParseFngParseTable
 

Detailed Description

The TensorRT Caffe parser API namespace.

Typedef Documentation

◆ LayerParseFn

typedef nvinfer1::ILayer*(* nvcaffeparser1::LayerParseFn) (nvinfer1::INetworkDefinition &, const trtcaffe::LayerParameter &, CaffeWeightFactory &, BlobNameToTensor &)

Enumeration Type Documentation

◆ WeightType

Enumerator
kGENERIC 
kBIAS 
kMEAN 
kVARIANCE 
kMOVING_AVERAGE 
kNVMEAN 
kNVVARIANCE 
kNVSCALE 
kNVBIAS 

Function Documentation

◆ createCaffeParser()

ICaffeParser * nvcaffeparser1::createCaffeParser ( )

Creates a ICaffeParser object.

Returns
A pointer to the ICaffeParser object is returned.
See also
nvcaffeparser1::ICaffeParser
Here is the caller graph for this function:

◆ shutdownProtobufLibrary()

void nvcaffeparser1::shutdownProtobufLibrary ( )

Shuts down protocol buffers library.

Note
No part of the protocol buffers library can be used after this function is called.
Here is the caller graph for this function:

◆ checkBlobs()

bool nvcaffeparser1::checkBlobs ( const trtcaffe::LayerParameter &  msg,
int  bottoms,
int  tops 
)
inline
Here is the caller graph for this function:

◆ parseAbsVal()

ILayer * nvcaffeparser1::parseAbsVal ( nvinfer1::INetworkDefinition network,
const trtcaffe::LayerParameter &  msg,
CaffeWeightFactory ,
BlobNameToTensor tensors 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parseBatchNormalization()

ILayer * nvcaffeparser1::parseBatchNormalization ( nvinfer1::INetworkDefinition network,
const trtcaffe::LayerParameter &  msg,
CaffeWeightFactory weightFactory,
BlobNameToTensor tensors 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parseBNLL()

ILayer * nvcaffeparser1::parseBNLL ( nvinfer1::INetworkDefinition network,
const trtcaffe::LayerParameter &  msg,
CaffeWeightFactory ,
BlobNameToTensor tensors 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parseClip()

ILayer * nvcaffeparser1::parseClip ( nvinfer1::INetworkDefinition network,
const trtcaffe::LayerParameter &  msg,
CaffeWeightFactory ,
BlobNameToTensor tensors 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parseConcat()

ILayer * nvcaffeparser1::parseConcat ( nvinfer1::INetworkDefinition network,
const trtcaffe::LayerParameter &  msg,
CaffeWeightFactory ,
BlobNameToTensor tensors 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parseConvolution()

ILayer * nvcaffeparser1::parseConvolution ( nvinfer1::INetworkDefinition network,
const trtcaffe::LayerParameter &  msg,
CaffeWeightFactory weightFactory,
BlobNameToTensor tensors 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parseCrop()

ILayer * nvcaffeparser1::parseCrop ( nvinfer1::INetworkDefinition network,
const trtcaffe::LayerParameter &  msg,
CaffeWeightFactory ,
BlobNameToTensor tensors 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parseDeconvolution()

ILayer * nvcaffeparser1::parseDeconvolution ( nvinfer1::INetworkDefinition network,
const trtcaffe::LayerParameter &  msg,
CaffeWeightFactory weightFactory,
BlobNameToTensor tensors 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parseEltwise()

ILayer * nvcaffeparser1::parseEltwise ( nvinfer1::INetworkDefinition network,
const trtcaffe::LayerParameter &  msg,
CaffeWeightFactory ,
BlobNameToTensor tensors 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parseELU()

ILayer * nvcaffeparser1::parseELU ( nvinfer1::INetworkDefinition network,
const trtcaffe::LayerParameter &  msg,
CaffeWeightFactory ,
BlobNameToTensor tensors 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parseInnerProduct()

ILayer * nvcaffeparser1::parseInnerProduct ( nvinfer1::INetworkDefinition network,
const trtcaffe::LayerParameter &  msg,
CaffeWeightFactory weightFactory,
BlobNameToTensor tensors 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parseLRN()

ILayer * nvcaffeparser1::parseLRN ( nvinfer1::INetworkDefinition network,
const trtcaffe::LayerParameter &  msg,
CaffeWeightFactory ,
BlobNameToTensor tensors 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parsePermute()

ILayer * nvcaffeparser1::parsePermute ( nvinfer1::INetworkDefinition network,
const trtcaffe::LayerParameter &  msg,
CaffeWeightFactory ,
BlobNameToTensor tensors 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parsePooling()

ILayer * nvcaffeparser1::parsePooling ( nvinfer1::INetworkDefinition network,
const trtcaffe::LayerParameter &  msg,
CaffeWeightFactory ,
BlobNameToTensor tensors 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parsePower()

ILayer * nvcaffeparser1::parsePower ( nvinfer1::INetworkDefinition network,
const trtcaffe::LayerParameter &  msg,
CaffeWeightFactory weightFactory,
BlobNameToTensor tensors 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parsePReLU()

ILayer * nvcaffeparser1::parsePReLU ( nvinfer1::INetworkDefinition network,
const trtcaffe::LayerParameter &  msg,
CaffeWeightFactory weightFactory,
BlobNameToTensor tensors 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parseReduction()

ILayer * nvcaffeparser1::parseReduction ( nvinfer1::INetworkDefinition network,
const trtcaffe::LayerParameter &  msg,
CaffeWeightFactory weightFactory,
BlobNameToTensor tensors 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parseReLU()

ILayer * nvcaffeparser1::parseReLU ( nvinfer1::INetworkDefinition network,
const trtcaffe::LayerParameter &  msg,
CaffeWeightFactory ,
BlobNameToTensor tensors 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parseReshape()

ILayer * nvcaffeparser1::parseReshape ( nvinfer1::INetworkDefinition network,
const trtcaffe::LayerParameter &  msg,
CaffeWeightFactory ,
BlobNameToTensor tensors 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parseScale()

ILayer * nvcaffeparser1::parseScale ( nvinfer1::INetworkDefinition network,
const trtcaffe::LayerParameter &  msg,
CaffeWeightFactory weightFactory,
BlobNameToTensor tensors 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parseSigmoid()

ILayer * nvcaffeparser1::parseSigmoid ( nvinfer1::INetworkDefinition network,
const trtcaffe::LayerParameter &  msg,
CaffeWeightFactory ,
BlobNameToTensor tensors 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parseSoftMax()

ILayer * nvcaffeparser1::parseSoftMax ( nvinfer1::INetworkDefinition network,
const trtcaffe::LayerParameter &  msg,
CaffeWeightFactory ,
BlobNameToTensor tensors 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parseTanH()

ILayer * nvcaffeparser1::parseTanH ( nvinfer1::INetworkDefinition network,
const trtcaffe::LayerParameter &  msg,
CaffeWeightFactory ,
BlobNameToTensor tensors 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ bnConvertWrap()

template<typename T >
bool nvcaffeparser1::bnConvertWrap ( float  scaleFactor,
const Weights variance,
const Weights mean,
const Weights scaleBlob,
const Weights biasBlob,
Weights shift,
Weights scale,
float  eps,
bool  nvCaffe,
CaffeWeightFactory weightFactory 
)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ readBinaryProto()

bool nvcaffeparser1::readBinaryProto ( trtcaffe::NetParameter *  net,
const char *  file,
size_t  bufSize 
)
Here is the caller graph for this function:

◆ readTextProto()

bool nvcaffeparser1::readTextProto ( trtcaffe::NetParameter *  net,
const char *  file 
)
Here is the caller graph for this function:

Variable Documentation

◆ gParseTable

std::unordered_map<std::string, LayerParseFn> nvcaffeparser1::gParseTable
static
Initial value:
{
{"Convolution", parseConvolution},
{"Pooling", parsePooling},
{"InnerProduct", parseInnerProduct},
{"ReLU", parseReLU},
{"Softmax", parseSoftMax},
{"SoftmaxWithLoss", parseSoftMax},
{"LRN", parseLRN},
{"Power", parsePower},
{"Eltwise", parseEltwise},
{"Concat", parseConcat},
{"Deconvolution", parseDeconvolution},
{"Sigmoid", parseSigmoid},
{"TanH", parseTanH},
{"BatchNorm", parseBatchNormalization},
{"Scale", parseScale},
{"Crop", parseCrop},
{"Reduction", parseReduction},
{"Reshape", parseReshape},
{"Permute", parsePermute},
{"ELU", parseELU},
{"BNLL", parseBNLL},
{"Clip", parseClip},
{"AbsVal", parseAbsVal},
{"PReLU", parsePReLU}
}
nvcaffeparser1::parseELU
nvinfer1::ILayer * parseELU(nvinfer1::INetworkDefinition &network, const trtcaffe::LayerParameter &msg, CaffeWeightFactory &, BlobNameToTensor &tensors)
Definition: parseELU.cpp:23
nvcaffeparser1::parseLRN
nvinfer1::ILayer * parseLRN(nvinfer1::INetworkDefinition &network, const trtcaffe::LayerParameter &msg, CaffeWeightFactory &, BlobNameToTensor &tensors)
Definition: parseLRN.cpp:23
nvcaffeparser1::parseReshape
nvinfer1::ILayer * parseReshape(nvinfer1::INetworkDefinition &network, const trtcaffe::LayerParameter &msg, CaffeWeightFactory &, BlobNameToTensor &tensors)
Definition: parseReshape.cpp:23
nvcaffeparser1::parseEltwise
nvinfer1::ILayer * parseEltwise(nvinfer1::INetworkDefinition &network, const trtcaffe::LayerParameter &msg, CaffeWeightFactory &, BlobNameToTensor &tensors)
Definition: parseEltwise.cpp:23
nvcaffeparser1::parsePReLU
nvinfer1::ILayer * parsePReLU(nvinfer1::INetworkDefinition &network, const trtcaffe::LayerParameter &msg, CaffeWeightFactory &weightFactory, BlobNameToTensor &tensors)
Definition: parsePReLU.cpp:23
nvcaffeparser1::parseSoftMax
nvinfer1::ILayer * parseSoftMax(nvinfer1::INetworkDefinition &network, const trtcaffe::LayerParameter &msg, CaffeWeightFactory &, BlobNameToTensor &tensors)
Definition: parseSoftMax.cpp:23
nvcaffeparser1::parseDeconvolution
nvinfer1::ILayer * parseDeconvolution(nvinfer1::INetworkDefinition &network, const trtcaffe::LayerParameter &msg, CaffeWeightFactory &weightFactory, BlobNameToTensor &tensors)
Definition: parseDeconv.cpp:23
nvcaffeparser1::parseConvolution
nvinfer1::ILayer * parseConvolution(nvinfer1::INetworkDefinition &network, const trtcaffe::LayerParameter &msg, CaffeWeightFactory &weightFactory, BlobNameToTensor &tensors)
Definition: parseConv.cpp:23
nvcaffeparser1::parseInnerProduct
nvinfer1::ILayer * parseInnerProduct(nvinfer1::INetworkDefinition &network, const trtcaffe::LayerParameter &msg, CaffeWeightFactory &weightFactory, BlobNameToTensor &tensors)
Definition: parseInnerProduct.cpp:23
nvcaffeparser1::parseClip
nvinfer1::ILayer * parseClip(nvinfer1::INetworkDefinition &network, const trtcaffe::LayerParameter &msg, CaffeWeightFactory &, BlobNameToTensor &tensors)
Definition: parseClip.cpp:23
nvcaffeparser1::parseTanH
nvinfer1::ILayer * parseTanH(nvinfer1::INetworkDefinition &network, const trtcaffe::LayerParameter &msg, CaffeWeightFactory &, BlobNameToTensor &tensors)
Definition: parseTanH.cpp:23
nvcaffeparser1::parseAbsVal
nvinfer1::ILayer * parseAbsVal(nvinfer1::INetworkDefinition &network, const trtcaffe::LayerParameter &msg, CaffeWeightFactory &, BlobNameToTensor &tensors)
Definition: parseAbsVal.cpp:23
nvcaffeparser1::parseBNLL
nvinfer1::ILayer * parseBNLL(nvinfer1::INetworkDefinition &network, const trtcaffe::LayerParameter &msg, CaffeWeightFactory &, BlobNameToTensor &tensors)
Definition: parseBNLL.cpp:23
nvcaffeparser1::parsePooling
nvinfer1::ILayer * parsePooling(nvinfer1::INetworkDefinition &network, const trtcaffe::LayerParameter &msg, CaffeWeightFactory &, BlobNameToTensor &tensors)
Definition: parsePooling.cpp:23
nvcaffeparser1::parsePower
nvinfer1::ILayer * parsePower(nvinfer1::INetworkDefinition &network, const trtcaffe::LayerParameter &msg, CaffeWeightFactory &weightFactory, BlobNameToTensor &tensors)
Definition: parsePower.cpp:23
nvcaffeparser1::parseSigmoid
nvinfer1::ILayer * parseSigmoid(nvinfer1::INetworkDefinition &network, const trtcaffe::LayerParameter &msg, CaffeWeightFactory &, BlobNameToTensor &tensors)
Definition: parseSigmoid.cpp:23
nvcaffeparser1::parsePermute
nvinfer1::ILayer * parsePermute(nvinfer1::INetworkDefinition &network, const trtcaffe::LayerParameter &msg, CaffeWeightFactory &, BlobNameToTensor &tensors)
Definition: parsePermute.cpp:23
nvcaffeparser1::parseConcat
nvinfer1::ILayer * parseConcat(nvinfer1::INetworkDefinition &network, const trtcaffe::LayerParameter &msg, CaffeWeightFactory &, BlobNameToTensor &tensors)
Definition: parseConcat.cpp:23
nvcaffeparser1::parseCrop
nvinfer1::ILayer * parseCrop(nvinfer1::INetworkDefinition &network, const trtcaffe::LayerParameter &msg, CaffeWeightFactory &, BlobNameToTensor &tensors)
Definition: parseCrop.cpp:23
nvcaffeparser1::parseReLU
nvinfer1::ILayer * parseReLU(nvinfer1::INetworkDefinition &network, const trtcaffe::LayerParameter &msg, CaffeWeightFactory &, BlobNameToTensor &tensors)
Definition: parseReLU.cpp:23
nvcaffeparser1::parseReduction
nvinfer1::ILayer * parseReduction(nvinfer1::INetworkDefinition &network, const trtcaffe::LayerParameter &msg, CaffeWeightFactory &weightFactory, BlobNameToTensor &tensors)
Definition: parseReduction.cpp:23
nvcaffeparser1::parseScale
nvinfer1::ILayer * parseScale(nvinfer1::INetworkDefinition &network, const trtcaffe::LayerParameter &msg, CaffeWeightFactory &weightFactory, BlobNameToTensor &tensors)
Definition: parseScale.cpp:23
nvcaffeparser1::parseBatchNormalization
nvinfer1::ILayer * parseBatchNormalization(nvinfer1::INetworkDefinition &network, const trtcaffe::LayerParameter &msg, CaffeWeightFactory &weightFactory, BlobNameToTensor &tensors)
Definition: parseBatchNorm.cpp:80