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

all it does is to evaluate BLEU score More...

Inheritance diagram for nmtSample::BLEUScoreWriter:
Collaboration diagram for nmtSample::BLEUScoreWriter:

Public Types

typedef std::shared_ptr< DataWriterptr
 

Public Member Functions

 BLEUScoreWriter (std::shared_ptr< std::istream > referenceTextInput, Vocabulary::ptr vocabulary, int maxOrder=4)
 
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...
 
float getScore () const
 
 ~BLEUScoreWriter () override=default
 

Static Protected Member Functions

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

Private Attributes

std::shared_ptr< std::istream > mReferenceInput
 
Vocabulary::ptr mVocabulary
 
size_t mReferenceLength
 
size_t mTranslationLength
 
int mMaxOrder
 
bool mSmooth
 
std::vector< size_t > mMatchesByOrder
 
std::vector< size_t > mPossibleMatchesByOrder
 

Detailed Description

all it does is to evaluate BLEU score

Member Typedef Documentation

◆ ptr

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

Constructor & Destructor Documentation

◆ BLEUScoreWriter()

nmtSample::BLEUScoreWriter::BLEUScoreWriter ( std::shared_ptr< std::istream >  referenceTextInput,
Vocabulary::ptr  vocabulary,
int  maxOrder = 4 
)

◆ ~BLEUScoreWriter()

nmtSample::BLEUScoreWriter::~BLEUScoreWriter ( )
overridedefault

Member Function Documentation

◆ write()

void nmtSample::BLEUScoreWriter::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::BLEUScoreWriter::initialize ( )
overridevirtual

it is called right before inference starts

Implements nmtSample::DataWriter.

◆ finalize()

void nmtSample::BLEUScoreWriter::finalize ( )
overridevirtual

it is called right after inference ends

Implements nmtSample::DataWriter.

Here is the call graph for this function:

◆ getInfo()

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

get the textual description of the component

Implements nmtSample::Component.

◆ getScore()

float nmtSample::BLEUScoreWriter::getScore ( ) const
Here is the caller graph for this function:

◆ 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

◆ mReferenceInput

std::shared_ptr<std::istream> nmtSample::BLEUScoreWriter::mReferenceInput
private

◆ mVocabulary

Vocabulary::ptr nmtSample::BLEUScoreWriter::mVocabulary
private

◆ mReferenceLength

size_t nmtSample::BLEUScoreWriter::mReferenceLength
private

◆ mTranslationLength

size_t nmtSample::BLEUScoreWriter::mTranslationLength
private

◆ mMaxOrder

int nmtSample::BLEUScoreWriter::mMaxOrder
private

◆ mSmooth

bool nmtSample::BLEUScoreWriter::mSmooth
private

◆ mMatchesByOrder

std::vector<size_t> nmtSample::BLEUScoreWriter::mMatchesByOrder
private

◆ mPossibleMatchesByOrder

std::vector<size_t> nmtSample::BLEUScoreWriter::mPossibleMatchesByOrder
private

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