calculates attention vector from context and decoder output vectors More...
Public Types | |
typedef std::shared_ptr< Attention > | ptr |
Public Member Functions | |
Attention ()=default | |
virtual void | addToModel (nvinfer1::INetworkDefinition *network, nvinfer1::ITensor *inputFromDecoder, nvinfer1::ITensor *context, nvinfer1::ITensor **attentionOutput)=0 |
add the attention vector calculation to the network More... | |
virtual int | getAttentionSize ()=0 |
get the size of the attention vector More... | |
~Attention () override=default | |
virtual std::string | getInfo ()=0 |
get the textual description of the component More... | |
calculates attention vector from context and decoder output vectors
typedef std::shared_ptr<Attention> nmtSample::Attention::ptr |
|
default |
|
overridedefault |
|
pure virtual |
add the attention vector calculation to the network
Implemented in nmtSample::SLPAttention.
|
pure virtual |
get the size of the attention vector
Implemented in nmtSample::SLPAttention.
|
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.