TensorRT  7.2.1.6
NVIDIA TensorRT
Looking for a C++ dev who knows TensorRT?
I'm looking for work. Hire me!
nmtSample::Encoder Class Referenceabstract

encodes input sentences into output states More...

Inheritance diagram for nmtSample::Encoder:
Collaboration diagram for nmtSample::Encoder:

Public Types

typedef std::shared_ptr< Encoderptr
 

Public Member Functions

 Encoder ()=default
 
virtual void addToModel (nvinfer1::INetworkDefinition *network, int maxInputSequenceLength, nvinfer1::ITensor *inputEmbeddedData, nvinfer1::ITensor *actualInputSequenceLengths, nvinfer1::ITensor **inputStates, nvinfer1::ITensor **memoryStates, nvinfer1::ITensor **lastTimestepStates)=0
 add the memory and last timestep states to the network lastTimestepHiddenStates is the pointer to the tensor where the encoder stores all layer hidden states for the last timestep (which is dependent on the sample), the function should define the tensor, it could be nullptr indicating these data are not needed More...
 
virtual int getMemoryStatesSize ()=0
 get the size of the memory state vector More...
 
virtual std::vector< nvinfer1::DimsgetStateSizes ()=0
 get the sizes (vector of them) of the hidden state vectors More...
 
 ~Encoder () override=default
 
virtual std::string getInfo ()=0
 get the textual description of the component More...
 

Detailed Description

encodes input sentences into output states

Member Typedef Documentation

◆ ptr

typedef std::shared_ptr<Encoder> nmtSample::Encoder::ptr

Constructor & Destructor Documentation

◆ Encoder()

nmtSample::Encoder::Encoder ( )
default

◆ ~Encoder()

nmtSample::Encoder::~Encoder ( )
overridedefault

Member Function Documentation

◆ addToModel()

virtual void nmtSample::Encoder::addToModel ( nvinfer1::INetworkDefinition network,
int  maxInputSequenceLength,
nvinfer1::ITensor inputEmbeddedData,
nvinfer1::ITensor actualInputSequenceLengths,
nvinfer1::ITensor **  inputStates,
nvinfer1::ITensor **  memoryStates,
nvinfer1::ITensor **  lastTimestepStates 
)
pure virtual

add the memory and last timestep states to the network lastTimestepHiddenStates is the pointer to the tensor where the encoder stores all layer hidden states for the last timestep (which is dependent on the sample), the function should define the tensor, it could be nullptr indicating these data are not needed

Implemented in nmtSample::LSTMEncoder.

◆ getMemoryStatesSize()

virtual int nmtSample::Encoder::getMemoryStatesSize ( )
pure virtual

get the size of the memory state vector

Implemented in nmtSample::LSTMEncoder.

◆ getStateSizes()

virtual std::vector<nvinfer1::Dims> nmtSample::Encoder::getStateSizes ( )
pure virtual

get the sizes (vector of them) of the hidden state vectors

Implemented in nmtSample::LSTMEncoder.

◆ getInfo()


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