writer of sequences of data More...
Public Types | |
typedef std::shared_ptr< DataWriter > | ptr |
Public Member Functions | |
DataWriter ()=default | |
virtual void | write (const int *hOutputData, int actualOutputSequenceLength, int actualInputSequenceLength)=0 |
write the generated sequence More... | |
virtual void | initialize ()=0 |
it is called right before inference starts More... | |
virtual void | finalize ()=0 |
it is called right after inference ends More... | |
~DataWriter () override=default | |
virtual std::string | getInfo ()=0 |
get the textual description of the component More... | |
Static Protected Member Functions | |
static std::string | generateText (int sequenceLength, const int *currentOutputData, Vocabulary::ptr vocabulary) |
writer of sequences of data
typedef std::shared_ptr<DataWriter> nmtSample::DataWriter::ptr |
|
default |
|
overridedefault |
|
pure virtual |
write the generated sequence
Implemented in nmtSample::BLEUScoreWriter, nmtSample::TextWriter, and nmtSample::BenchmarkWriter.
|
pure virtual |
it is called right before inference starts
Implemented in nmtSample::BLEUScoreWriter, nmtSample::TextWriter, and nmtSample::BenchmarkWriter.
|
pure virtual |
it is called right after inference ends
Implemented in nmtSample::BLEUScoreWriter, nmtSample::TextWriter, and nmtSample::BenchmarkWriter.
|
staticprotected |
|
pure virtualinherited |
get the textual description of the component
Implemented in nmtSample::SoftmaxLikelihood, nmtSample::BeamSearchPolicy, nmtSample::MultiplicativeAlignment, nmtSample::SLPEmbedder, nmtSample::SLPProjection, nmtSample::BLEUScoreWriter, nmtSample::Context, nmtSample::LSTMEncoder, nmtSample::TextWriter, nmtSample::SLPAttention, nmtSample::BenchmarkWriter, nmtSample::TextReader, nmtSample::LSTMDecoder, and nmtSample::LimitedSamplesDataReader.