docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method LSTM

    LSTM(TensorFloat, TensorFloat, TensorFloat, TensorFloat, TensorInt, TensorFloat, TensorFloat, TensorFloat, TensorFloat, TensorFloat, TensorFloat, RnnDirection, RnnActivation[], float[], float[], bool, float, RnnLayout)

    Generates an output tensor by computing a one-layer long short-term memory (LSTM) on an input tensor.

    Declaration
    public override void LSTM(TensorFloat X, TensorFloat W, TensorFloat R, TensorFloat B, TensorInt sequenceLens, TensorFloat initialH, TensorFloat initialC, TensorFloat P, TensorFloat Y, TensorFloat Yh, TensorFloat Yc, RnnDirection direction, RnnActivation[] activations, float[] activationAlpha, float[] activationBeta, bool inputForget, float clip, RnnLayout layout)
    Parameters
    Type Name Description
    TensorFloat X

    The input sequences tensor.

    TensorFloat W

    The weights tensor for the gates of the LSTM.

    TensorFloat R

    The recurrent weights tensor for the gates of the LSTM.

    TensorFloat B

    The optional bias tensor for the input gate of the LSTM.

    TensorInt sequenceLens

    The optional 1D tensor specifying the lengths of the sequences in a batch.

    TensorFloat initialH

    The optional initial values tensor of the hidden neurons of the LSTM. If this is null, the layer uses 0.

    TensorFloat initialC

    The optional initial values tensor of the cells of the LSTM. If this is null, the layer uses 0.

    TensorFloat P

    The optional weight tensor for the peepholes of the LSTM. If this is null, the layer uses 0.

    TensorFloat Y

    The output tensor to be computed and filled with the concatenated intermediate output values of the hidden.

    TensorFloat Yh

    The output tensor to be computed and filled with the last output value of the hidden.

    TensorFloat Yc

    The output tensor to be computed and filled with the last output value of the cell.

    RnnDirection direction

    The direction of the LSTM as an RnnDirection.

    RnnActivation[] activations

    The activation functions of the LSTM as an array of RnnActivation.

    float[] activationAlpha

    The alpha values of the activation functions of the LSTM.

    float[] activationBeta

    The beta values of the activation functions of the LSTM.

    bool inputForget

    Whether to forget the input values in the LSTM. If this is false, the layer couples the input and forget gates.

    float clip

    The cell clip threshold of the LSTM.

    RnnLayout layout

    The layout of the tensors as an RnnLayout.

    Overrides
    CPUBackend.LSTM(TensorFloat, TensorFloat, TensorFloat, TensorFloat, TensorInt, TensorFloat, TensorFloat, TensorFloat, TensorFloat, TensorFloat, TensorFloat, RnnDirection, RnnActivation[], float[], float[], bool, float, RnnLayout)
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)