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

Classes

class  Alignment
 represents the core of attention mechanism More...
 
class  Attention
 calculates attention vector from context and decoder output vectors More...
 
class  BeamSearchPolicy
 processes the results of one iteration of the generator with beam search and produces input for the next iteration More...
 
class  BenchmarkWriter
 all it does is to measure the performance of sequence generation More...
 
class  BLEUScoreWriter
 all it does is to evaluate BLEU score More...
 
class  Component
 a functional part of the sample More...
 
class  ComponentWeights
 weights storage More...
 
class  Context
 calculates context vector from raw alignment scores and memory states More...
 
class  DataReader
 reader of sequences of data More...
 
class  DataWriter
 writer of sequences of data More...
 
class  DebugUtil
 container for static debug utility functions More...
 
class  Decoder
 encodes single input into output states More...
 
class  DeviceBuffer
 
class  Embedder
 projects 1-hot vectors (represented as a vector with indices) into dense embedding space More...
 
class  Encoder
 encodes input sentences into output states More...
 
class  Likelihood
 calculates likelihood and TopK indices for the raw input logits More...
 
class  LikelihoodCombinationOperator
 
class  LimitedSamplesDataReader
 wraps another data reader and limits the number of samples to read More...
 
class  LSTMDecoder
 encodes single input into output states with LSTM More...
 
class  LSTMEncoder
 encodes input sentences into output states using LSTM More...
 
class  MultiplicativeAlignment
 alignment scores from Luong attention mechanism More...
 
class  PinnedHostBuffer
 wrapper for the pinned host memory region More...
 
class  Projection
 calculates raw logits More...
 
class  SequenceProperties
 provides encoder/decoder relevant properties of sequences More...
 
class  SLPAttention
 Linear attention calculation. More...
 
class  SLPEmbedder
 selects the embedding vector from the weight matrix using index provided in the input More...
 
class  SLPProjection
 Linear logits calculation. More...
 
class  SoftmaxLikelihood
 calculates softmax likelihood and TopK indices for the raw input logits More...
 
class  TextReader
 reads sequences of data from input stream More...
 
class  TextWriter
 
class  Vocabulary
 String<->Id bijection storage. More...
 

Typedefs

typedef std::vector< std::string > Segment_t
 
typedef std::map< Segment_t, intCount_t
 

Functions

int read (std::vector< Segment_t > &samples, std::shared_ptr< std::istream > input, int samplesToRead=1)
 
Count_t ngramCounts (const Segment_t &segment, int maxOrder=4)
 
Count_t ngramCountIntersection (const Count_t &cnt0, const Count_t &cnt1)
 
void accumulateBLEU (const std::vector< Segment_t > &referenceSamples, const std::vector< Segment_t > &outputSamples, int maxOrder, size_t &referenceLength, size_t &translationLength, std::vector< size_t > &matchesByOrder, std::vector< size_t > &possibleMatchesByOrder)
 
std::istream & operator>> (std::istream &input, Vocabulary &value)
 
std::istream & operator>> (std::istream &input, ComponentWeights &value)
 
int inferTypeToBytes (nvinfer1::DataType t)
 
int getVolume (nvinfer1::Dims dims)
 
std::vector< float > resizeWeights (int rows, int cols, int rowsNew, int colsNew, const float *memory)
 

Typedef Documentation

◆ Segment_t

typedef std::vector<std::string> nmtSample::Segment_t

◆ Count_t

typedef std::map<Segment_t, int> nmtSample::Count_t

Function Documentation

◆ read()

int nmtSample::read ( std::vector< Segment_t > &  samples,
std::shared_ptr< std::istream >  input,
int  samplesToRead = 1 
)
Here is the caller graph for this function:

◆ ngramCounts()

Count_t nmtSample::ngramCounts ( const Segment_t segment,
int  maxOrder = 4 
)
Here is the caller graph for this function:

◆ ngramCountIntersection()

Count_t nmtSample::ngramCountIntersection ( const Count_t cnt0,
const Count_t cnt1 
)
Here is the caller graph for this function:

◆ accumulateBLEU()

void nmtSample::accumulateBLEU ( const std::vector< Segment_t > &  referenceSamples,
const std::vector< Segment_t > &  outputSamples,
int  maxOrder,
size_t &  referenceLength,
size_t &  translationLength,
std::vector< size_t > &  matchesByOrder,
std::vector< size_t > &  possibleMatchesByOrder 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator>>() [1/2]

std::istream& nmtSample::operator>> ( std::istream &  input,
Vocabulary value 
)
Here is the call graph for this function:

◆ operator>>() [2/2]

std::istream& nmtSample::operator>> ( std::istream &  input,
ComponentWeights value 
)

◆ inferTypeToBytes()

int nmtSample::inferTypeToBytes ( nvinfer1::DataType  t)
Here is the caller graph for this function:

◆ getVolume()

int nmtSample::getVolume ( nvinfer1::Dims  dims)

◆ resizeWeights()

std::vector< float > nmtSample::resizeWeights ( int  rows,
int  cols,
int  rowsNew,
int  colsNew,
const float *  memory 
)
Here is the caller graph for this function: