selects the embedding vector from the weight matrix using index provided in the input More...
Public Types | |
typedef std::shared_ptr< Embedder > | ptr |
Public Member Functions | |
SLPEmbedder (ComponentWeights::ptr weights) | |
void | addToModel (nvinfer1::INetworkDefinition *network, nvinfer1::ITensor *input, nvinfer1::ITensor **output) override |
add the embedding vector calculation to the network More... | |
int | getInputDimensionSize () override |
get the upper bound for the possible values of indices More... | |
std::string | getInfo () override |
get the textual description of the component More... | |
~SLPEmbedder () override=default | |
Protected Attributes | |
ComponentWeights::ptr | mWeights |
nvinfer1::Weights | mKernelWeights |
int | mNumInputs |
int | mNumOutputs |
std::vector< float > | mResizedKernelWeights |
selects the embedding vector from the weight matrix using index provided in the input
|
inherited |
nmtSample::SLPEmbedder::SLPEmbedder | ( | ComponentWeights::ptr | weights | ) |
|
overridedefault |
|
overridevirtual |
add the embedding vector calculation to the network
Implements nmtSample::Embedder.
|
overridevirtual |
get the upper bound for the possible values of indices
Implements nmtSample::Embedder.
|
overridevirtual |
get the textual description of the component
Implements nmtSample::Component.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |