Poplar and PopLibs
|
Structure representing the parameters of the LSTM. More...
#include <Lstm.hpp>
Public Attributes | |
poplar::Type | dataType |
The datatype of the LSTM. More... | |
std::size_t | batchSize |
The batch size. More... | |
std::size_t | timeSteps |
The number of time steps in the sequence of the LSTM. More... | |
std::vector< std::size_t > | layerSizes |
The number of neurons before and after each layer of the LSTM. More... | |
bool | outputFullSequence = true |
If true the Lstm function returns the entire sequence of outputs, otherwise it returns just the final output. | |
bool | doInputWeightCalc = true |
If this parameter is set to false then the LSTM will skip the calculation of weighted inputs (only useful for benchmarking). | |
bool | calcInputGradients = true |
If this parameter is set to false then the LSTM will skip the calculation of the gradients of the inputs. | |
bool | preserveFinalState = false |
If this parameter is set to true then the LSTM will preserve the internal state at the last valid timestep for each batch entry when using variable timesteps. More... | |
std::vector< BasicLstmCellUnit > | cellOrder = getDefaultBasicLstmCellOrder() |
The weights and biases for all of the layers being processed are concatenated in the outermost dimension of the weights and biases tensors. More... | |
NonLinearityType | activation = NonLinearityType::TANH |
Activation function. | |
NonLinearityType | recurrentActivation = NonLinearityType::SIGMOID |
Recurrent activation function. | |
Structure representing the parameters of the LSTM.
std::size_t popnn::lstm::LstmParams::batchSize |
The batch size.
std::vector<BasicLstmCellUnit> popnn::lstm::LstmParams::cellOrder = getDefaultBasicLstmCellOrder() |
The weights and biases for all of the layers being processed are concatenated in the outermost dimension of the weights and biases tensors.
This option allows you to specify the order of the gates in that outermost dimension. The default order can be obtained with getDefaultBasicLstmCellOrder().
poplar::Type popnn::lstm::LstmParams::dataType |
The datatype of the LSTM.
std::vector<std::size_t> popnn::lstm::LstmParams::layerSizes |
The number of neurons before and after each layer of the LSTM.
If the LSTM consists of N layers, then this should be a vector of size N+1. The first element is the input size and each subsequent element is the output size of the LSTM layer.
bool popnn::lstm::LstmParams::preserveFinalState = false |
If this parameter is set to true then the LSTM will preserve the internal state at the last valid timestep for each batch entry when using variable timesteps.
This may come with a speed penalty. See RnnParams for information about variable timesteps. Use of this parameter does not affect the retained intermediate results in the case of training.
std::size_t popnn::lstm::LstmParams::timeSteps |
The number of time steps in the sequence of the LSTM.