Skip to content

use tensordot to have proper generalized outer product#134

Open
marcelluethi wants to merge 1 commit into
dimwit-dev:mainfrom
marcelluethi:generalize-outer-prod
Open

use tensordot to have proper generalized outer product#134
marcelluethi wants to merge 1 commit into
dimwit-dev:mainfrom
marcelluethi:generalize-outer-prod

Conversation

@marcelluethi

Copy link
Copy Markdown
Contributor

The outer product in dimwit is implemented using jnp.outer, which only works correctly for tensors of rank 1.
This PR proposes to use jnp.tensordot(.... axis=0) instead, which is the generalized outer product, which works correctly for arbitrary tensors and corresponds to what the signature the method outerProduct promises.

@marcelluethi
marcelluethi requested a review from benikm91 July 21, 2026 14:36
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.

1 participant