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

Public Types

typedef std::shared_ptr< DataWriterptr
 

Public Member Functions

 TextWriter (std::shared_ptr< std::ostream > textOnput, Vocabulary::ptr vocabulary)
 
void write (const int *hOutputData, int actualOutputSequenceLength, int actualInputSequenceLength) override
 write the generated sequence More...
 
void initialize () override
 it is called right before inference starts More...
 
void finalize () override
 it is called right after inference ends More...
 
std::string getInfo () override
 get the textual description of the component More...
 
 ~TextWriter () override=default
 

Static Protected Member Functions

static std::string generateText (int sequenceLength, const int *currentOutputData, Vocabulary::ptr vocabulary)
 

Private Attributes

std::shared_ptr< std::ostream > mOutput
 
Vocabulary::ptr mVocabulary
 

Member Typedef Documentation

◆ ptr

typedef std::shared_ptr<DataWriter> nmtSample::DataWriter::ptr
inherited

Constructor & Destructor Documentation

◆ TextWriter()

nmtSample::TextWriter::TextWriter ( std::shared_ptr< std::ostream >  textOnput,
Vocabulary::ptr  vocabulary 
)

◆ ~TextWriter()

nmtSample::TextWriter::~TextWriter ( )
overridedefault

Member Function Documentation

◆ write()

void nmtSample::TextWriter::write ( const int hOutputData,
int  actualOutputSequenceLength,
int  actualInputSequenceLength 
)
overridevirtual

write the generated sequence

Implements nmtSample::DataWriter.

Here is the call graph for this function:

◆ initialize()

void nmtSample::TextWriter::initialize ( )
overridevirtual

it is called right before inference starts

Implements nmtSample::DataWriter.

◆ finalize()

void nmtSample::TextWriter::finalize ( )
overridevirtual

it is called right after inference ends

Implements nmtSample::DataWriter.

◆ getInfo()

std::string nmtSample::TextWriter::getInfo ( )
overridevirtual

get the textual description of the component

Implements nmtSample::Component.

◆ generateText()

std::string nmtSample::DataWriter::generateText ( int  sequenceLength,
const int currentOutputData,
Vocabulary::ptr  vocabulary 
)
staticprotectedinherited
Here is the caller graph for this function:

Member Data Documentation

◆ mOutput

std::shared_ptr<std::ostream> nmtSample::TextWriter::mOutput
private

◆ mVocabulary

Vocabulary::ptr nmtSample::TextWriter::mVocabulary
private

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