Skip to content

Bugfix: avoid squeezing batch size 1 dimension in lstm and gru emulation code#913

Merged
fdwr merged 1 commit intowebmachinelearning:mainfrom
huningxin:fix_lstm_emulation
Jan 9, 2026
Merged

Bugfix: avoid squeezing batch size 1 dimension in lstm and gru emulation code#913
fdwr merged 1 commit intowebmachinelearning:mainfrom
huningxin:fix_lstm_emulation

Conversation

@huningxin
Copy link
Copy Markdown
Contributor

@huningxin huningxin commented Jan 4, 2026

Also fixes an issue of squeeze and unsqueeze emulation code. It should use for...of loop to get axes values rather than indices.

Fix #889


Preview | Diff

Also fixes an issue of squeeze and unsqueeze emulation code. It should
use for...of loop to get axes values rather than indices.

Fix webmachinelearning#889
@huningxin huningxin requested review from fdwr and reillyeon January 4, 2026 06:10
Copy link
Copy Markdown
Collaborator

@fdwr fdwr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should use for...of loop to get axes values rather than indices.

Oh Javascript, you're so special there compared to every other programming language... 🤦‍♂️ Thanks Ningxin.

Copy link
Copy Markdown
Member

@anssiko anssiko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe you're settled with JS oddities, so this is mergeable without further discussion.

@fdwr fdwr merged commit 91745cf into webmachinelearning:main Jan 9, 2026
2 checks passed
github-actions bot added a commit that referenced this pull request Jan 9, 2026
…ion (#913)

SHA: 91745cf
Reason: push, by fdwr

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The decomposition of lstm has issue for batch size 1 input

4 participants