TensorRT  7.2.1.6
NVIDIA TensorRT
Looking for a C++ dev who knows TensorRT?
I'm looking for work. Hire me!
nvcaffeparser1::CaffeWeightFactory Class Reference
Collaboration diagram for nvcaffeparser1::CaffeWeightFactory:

Public Member Functions

 CaffeWeightFactory (const trtcaffe::NetParameter &msg, nvinfer1::DataType dataType, std::vector< void * > &tmpAllocs, bool isInitialized)
 
nvinfer1::DataType getDataType () const
 
size_t getDataTypeSize () const
 
std::vector< void * > & getTmpAllocs ()
 
int getBlobsSize (const std::string &layerName)
 
const trtcaffe::BlobProto * getBlob (const std::string &layerName, int index)
 
std::vector< nvinfer1::WeightsgetAllWeights (const std::string &layerName)
 
virtual nvinfer1::Weights operator() (const std::string &layerName, WeightType weightType)
 
void convert (nvinfer1::Weights &weights, nvinfer1::DataType targetType)
 
void convert (nvinfer1::Weights &weights)
 
bool isOK ()
 
bool isInitialized ()
 
nvinfer1::Weights getNullWeights ()
 
nvinfer1::Weights allocateWeights (int64_t elems, std::uniform_real_distribution< float > distribution=std::uniform_real_distribution< float >(-0.01f, 0.01F))
 
nvinfer1::Weights allocateWeights (int64_t elems, std::normal_distribution< float > distribution)
 

Static Public Member Functions

static trtcaffe::Type getBlobProtoDataType (const trtcaffe::BlobProto &blobMsg)
 
static size_t sizeOfCaffeType (trtcaffe::Type type)
 
static std::pair< const void *, size_t > getBlobProtoData (const trtcaffe::BlobProto &blobMsg, trtcaffe::Type type, std::vector< void * > &tmpAllocs)
 

Private Member Functions

template<typename T >
bool checkForNans (const void *values, int count, const std::string &layerName)
 
nvinfer1::Weights getWeights (const trtcaffe::BlobProto &blobMsg, const std::string &layerName)
 

Private Attributes

const trtcaffe::NetParameter & mMsg
 
std::unique_ptr< trtcaffe::NetParameter > mRef
 
std::vector< void * > & mTmpAllocs
 
nvinfer1::DataType mDataType
 
bool mInitialized
 
std::default_random_engine generator
 
bool mOK {true}
 

Constructor & Destructor Documentation

◆ CaffeWeightFactory()

CaffeWeightFactory::CaffeWeightFactory ( const trtcaffe::NetParameter &  msg,
nvinfer1::DataType  dataType,
std::vector< void * > &  tmpAllocs,
bool  isInitialized 
)

Member Function Documentation

◆ getDataType()

DataType CaffeWeightFactory::getDataType ( ) const
Here is the caller graph for this function:

◆ getDataTypeSize()

size_t CaffeWeightFactory::getDataTypeSize ( ) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getTmpAllocs()

std::vector< void * > & CaffeWeightFactory::getTmpAllocs ( )
Here is the caller graph for this function:

◆ getBlobsSize()

int CaffeWeightFactory::getBlobsSize ( const std::string &  layerName)
Here is the caller graph for this function:

◆ getBlob()

const trtcaffe::BlobProto * CaffeWeightFactory::getBlob ( const std::string &  layerName,
int  index 
)
Here is the caller graph for this function:

◆ getAllWeights()

std::vector< Weights > CaffeWeightFactory::getAllWeights ( const std::string &  layerName)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator()()

Weights CaffeWeightFactory::operator() ( const std::string &  layerName,
WeightType  weightType 
)
virtual
Here is the call graph for this function:

◆ convert() [1/2]

void CaffeWeightFactory::convert ( nvinfer1::Weights weights,
nvinfer1::DataType  targetType 
)
Here is the caller graph for this function:

◆ convert() [2/2]

void CaffeWeightFactory::convert ( nvinfer1::Weights weights)
Here is the call graph for this function:

◆ isOK()

bool CaffeWeightFactory::isOK ( )
Here is the caller graph for this function:

◆ isInitialized()

bool CaffeWeightFactory::isInitialized ( )
Here is the caller graph for this function:

◆ getNullWeights()

Weights CaffeWeightFactory::getNullWeights ( )
Here is the caller graph for this function:

◆ allocateWeights() [1/2]

Weights CaffeWeightFactory::allocateWeights ( int64_t  elems,
std::uniform_real_distribution< float >  distribution = std::uniform_real_distribution<float>(-0.01f, 0.01F) 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ allocateWeights() [2/2]

Weights CaffeWeightFactory::allocateWeights ( int64_t  elems,
std::normal_distribution< float >  distribution 
)
Here is the call graph for this function:

◆ getBlobProtoDataType()

trtcaffe::Type CaffeWeightFactory::getBlobProtoDataType ( const trtcaffe::BlobProto &  blobMsg)
static

◆ sizeOfCaffeType()

size_t CaffeWeightFactory::sizeOfCaffeType ( trtcaffe::Type  type)
static
Here is the caller graph for this function:

◆ getBlobProtoData()

std::pair< const void *, size_t > CaffeWeightFactory::getBlobProtoData ( const trtcaffe::BlobProto &  blobMsg,
trtcaffe::Type  type,
std::vector< void * > &  tmpAllocs 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkForNans()

template<typename T >
bool CaffeWeightFactory::checkForNans ( const void *  values,
int  count,
const std::string &  layerName 
)
private

◆ getWeights()

Weights CaffeWeightFactory::getWeights ( const trtcaffe::BlobProto &  blobMsg,
const std::string &  layerName 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ mMsg

const trtcaffe::NetParameter& nvcaffeparser1::CaffeWeightFactory::mMsg
private

◆ mRef

std::unique_ptr<trtcaffe::NetParameter> nvcaffeparser1::CaffeWeightFactory::mRef
private

◆ mTmpAllocs

std::vector<void*>& nvcaffeparser1::CaffeWeightFactory::mTmpAllocs
private

◆ mDataType

nvinfer1::DataType nvcaffeparser1::CaffeWeightFactory::mDataType
private

◆ mInitialized

bool nvcaffeparser1::CaffeWeightFactory::mInitialized
private

◆ generator

std::default_random_engine nvcaffeparser1::CaffeWeightFactory::generator
private

◆ mOK

bool nvcaffeparser1::CaffeWeightFactory::mOK {true}
private

The documentation for this class was generated from the following files: