|
virtual int32_t | getLayerCount () const =0 |
|
virtual int32_t | getHiddenSize () const =0 |
|
virtual int32_t | getMaxSeqLength () const =0 |
|
virtual int32_t | getDataLength () const =0 |
|
virtual void | setSequenceLengths (ITensor &seqLengths)=0 |
| Specify individual sequence lengths in the batch with the ITensor pointed to by seqLengths . More...
|
|
virtual ITensor * | getSequenceLengths () const =0 |
| Get the sequence lengths specified for the RNN. More...
|
|
virtual void | setOperation (RNNOperation op)=0 |
| Set the operation of the RNN layer. More...
|
|
virtual RNNOperation | getOperation () const =0 |
| Get the operation of the RNN layer. More...
|
|
virtual void | setInputMode (RNNInputMode op)=0 |
| Set the input mode of the RNN layer. More...
|
|
virtual RNNInputMode | getInputMode () const =0 |
| Get the input mode of the RNN layer. More...
|
|
virtual void | setDirection (RNNDirection op)=0 |
| Set the direction of the RNN layer. More...
|
|
virtual RNNDirection | getDirection () const =0 |
| Get the direction of the RNN layer. More...
|
|
virtual void | setWeightsForGate (int layerIndex, RNNGateType gate, bool isW, Weights weights)=0 |
| Set the weight parameters for an individual gate in the RNN. More...
|
|
virtual Weights | getWeightsForGate (int layerIndex, RNNGateType gate, bool isW) const =0 |
| Get the weight parameters for an individual gate in the RNN. More...
|
|
virtual void | setBiasForGate (int layerIndex, RNNGateType gate, bool isW, Weights bias)=0 |
| Set the bias parameters for an individual gate in the RNN. More...
|
|
virtual Weights | getBiasForGate (int layerIndex, RNNGateType gate, bool isW) const =0 |
| Get the bias parameters for an individual gate in the RNN. More...
|
|
virtual void | setHiddenState (ITensor &hidden)=0 |
| Set the initial hidden state of the RNN with the provided hidden ITensor. More...
|
|
virtual ITensor * | getHiddenState () const =0 |
| Get the initial hidden state of the RNN. More...
|
|
virtual void | setCellState (ITensor &cell)=0 |
| Set the initial cell state of the LSTM with the provided cell ITensor. More...
|
|
virtual ITensor * | getCellState () const =0 |
| Get the initial cell state of the RNN. More...
|
|
virtual LayerType | getType () const =0 |
| Return the type of a layer. More...
|
|
virtual void | setName (const char *name)=0 |
| Set the name of a layer. More...
|
|
virtual const char * | getName () const =0 |
| Return the name of a layer. More...
|
|
virtual int | getNbInputs () const =0 |
| Get the number of inputs of a layer.
|
|
virtual ITensor * | getInput (int index) const =0 |
| Get the layer input corresponding to the given index. More...
|
|
virtual int | getNbOutputs () const =0 |
| Get the number of outputs of a layer.
|
|
virtual ITensor * | getOutput (int index) const =0 |
| Get the layer output corresponding to the given index. More...
|
|
virtual void | setInput (int index, ITensor &tensor)=0 |
| Replace an input of this layer with a specific tensor. More...
|
|
virtual void | setPrecision (DataType dataType)=0 |
| Set the computational precision of this layer. More...
|
|
virtual DataType | getPrecision () const =0 |
| get the computational precision of this layer More...
|
|
virtual bool | precisionIsSet () const =0 |
| whether the computational precision has been set for this layer More...
|
|
virtual void | resetPrecision ()=0 |
| reset the computational precision for this layer More...
|
|
virtual void | setOutputType (int index, DataType dataType)=0 |
| Set the output type of this layer. More...
|
|
virtual DataType | getOutputType (int index) const =0 |
| get the output type of this layer More...
|
|
virtual bool | outputTypeIsSet (int index) const =0 |
| whether the output type has been set for this layer More...
|
|
virtual void | resetOutputType (int index)=0 |
| reset the output type for this layer More...
|
|
An RNN layer in a network definition, version 2.
This layer supersedes IRNNLayer.
- Warning
- Do not inherit from this class, as doing so will break forward-compatibility of the API and ABI.
virtual void nvinfer1::IRNNv2Layer::setSequenceLengths |
( |
ITensor & |
seqLengths | ) |
|
|
pure virtual |
Specify individual sequence lengths in the batch with the ITensor pointed to by seqLengths
.
The seqLengths
ITensor should be a {N1, ..., Np} tensor, where N1..Np are the index dimensions of the input tensor to the RNN.
If this is not specified, then the RNN layer assumes all sequences are size getMaxSeqLength().
All sequence lengths in seqLengths
should be in the range [1, getMaxSeqLength()]. Zero-length sequences are not supported.
This tensor must be of type DataType::kINT32.