Constructor LSTM
LSTM(string, string[], string[], int, RnnDirection, RnnActivation[], float[], float[], float, bool, RnnLayout)
Initializes and returns an instance of a Long Short-Term Memory Network (LSTM
) recurrent layer.
Declaration
public LSTM(string name, string[] inputs, string[] outputs, int hiddenSize, RnnDirection direction, RnnActivation[] activations = null, float[] activationAlpha = null, float[] activationBeta = null, float clip = 3.4028235E+38, bool inputForget = false, RnnLayout layout = RnnLayout.SequenceFirst)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name to use for the first output tensor of the layer. |
string[] | inputs | The names to use for the input tensors of the layer [X, W, R, (B, sequenceLens, initialH, initialC, P)].
|
string[] | outputs | The names for the output tensors of the layer [Y, Y_h, Y_c].
|
int | hiddenSize | The number of neurons in the hidden layer of the LSTM. |
RnnDirection | direction | The direction of the LSTM as an |
RnnActivation[] | activations | The activation functions of the LSTM as an array of |
float[] | activationAlpha | The alpha values of the activation functions of the LSTM.
|
float[] | activationBeta | The beta values of the activation functions of the LSTM.
|
float | clip | The cell clip threshold of the LSTM. The default value is |
bool | inputForget | Whether to forget the input values in the LSTM. If this is |
RnnLayout | layout | The layout of the tensors as an |