Contents

init(inputSize:hiddenSize:layerCount:usesBiases:batchFirst:isBidirectional:dropout:)

Creates a batch first LSTM descriptor that allows you to indicate whether the input and output shape is batch first.

Declaration

convenience init(inputSize: Int, hiddenSize: Int, layerCount: Int, usesBiases: Bool, batchFirst: Bool, isBidirectional: Bool, dropout: Float)

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.

  • dropout:

    The dropout probability rate.

See Also

Creating LSTM Descriptors