init(inputSize:hiddenSize:layerCount:usesBiases:batchFirst:isBidirectional:returnsSequences:dropout:resultMode:)
Creates a descriptor with the number of features and layers, dropout, and options for use of biases, batch order, return sequences, bidirectionality, and expected tensors you specify.
Declaration
convenience init(inputSize: Int, hiddenSize: Int, layerCount: Int, usesBiases: Bool, batchFirst: Bool, isBidirectional: Bool, returnsSequences: Bool, dropout: Float, resultMode: MLCLSTMResultMode)Parameters
- inputSize:
The number of expected features in the input.
- hiddenSize:
The number of features in the hidden state.
- layerCount:
The number of recurrent layers.
- usesBiases:
A Boolean that indicates whether you use bias weights. The default value is
true. - batchFirst:
A Boolean that indicates whether the first index of the input and output shape contains the batch size. The default value is
true. - isBidirectional:
A Boolean that indicates whether the layer becomes bidirectional. The default value is
false. - returnsSequences:
A Boolean that indicates whether the layer returns output for all sequences, or if
false, returns output for only the last sequences. The default value istrue. - dropout:
The dropout probability rate.
- resultMode:
The expected result mode for the layer. The default value is Output.