You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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].
BruceDai
changed the title
Need reverse output sequence for backward direction of lstm operator emulation
Need reverse output sequence for backward direction of gru and lstm operator emulations
Jan 14, 2025
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
The text was updated successfully, but these errors were encountered: