webmachinelearning / webnn

🧠 Web Neural Network API
https://www.w3.org/TR/webnn/
Other
397 stars 48 forks source link

Validate the hidden size of GRU and LSTM operators #644

Closed inexorabletash closed 7 months ago

inexorabletash commented 7 months ago

For gru()/gruCell() and lstm()/lstmCell(), a hiddenSize parameter is passed, a multiple of which defines a dimension of the output.

Introduce validation for all cases, validate the combined size, and add an explanation inline since this is subtle.

Fixes #625


Preview | Diff

huningxin commented 7 months ago

/cc @shiyi9801 @miaobin

zolkis commented 7 months ago

Special thanks for the clarifying notes.