Skip to content

Need reverse output sequence for backward direction of gru and lstm operator emulations #801

@BruceDai

Description

@BruceDai

Current lstm operator emulation computes the forward hidden sequence from t = 1 to T, and the backward hidden sequence
from t = T to 1.

While lstm operator of WebNN API Spec says "the third element is the 4-D output tensor of shape [steps, numDirections, batchSize, hiddenSize] containing every output from each time step in the temporal sequence", so we need reverse output sequence for backward direction of lstm operator emulation from [hb_T, ..., hb_1] to [hb_1, ..., hb_T].

I've firstly submitted a PR webmachinelearning/webnn-baseline#123 for preview.

@fdwr @huningxin PTAL, thanks!

/cc @philloooo @fujunwei

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions