Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[linen] fix DenseGeneral init #3834

Merged
merged 1 commit into from
Apr 11, 2024
Merged

Conversation

cgarciae
Copy link
Collaborator

@cgarciae cgarciae commented Apr 9, 2024

What does this PR do?

Removes the flattening / unflattening logic from DenseGeneral init wrappers. Original motivation for this was to better preserve the statistics for arrays with more than 2 feature dimension, however this can also be achieve via the in_axis and out_axis parameters of most initializers making this flattening process unnecesary.

pyproject.toml Outdated
Comment on lines 149 to 150
# DeprecationWarning: elementwise comparison failed; this will raise an error in the future.
"ignore:.*elementwise comparison failed; this will raise an error in the future.*:DeprecationWarning",
Copy link
Collaborator

@chiamp chiamp Apr 10, 2024

Choose a reason for hiding this comment

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

Where is this error originating from? Can it be fixed by jnp.broadcast_to or jnp.expand_dims? If this will throw an error in the future, we should probably try to fix it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I removed as it appears this is only happening locally

@cgarciae cgarciae force-pushed the linen-fix-dense-general-init branch from 74e328e to 36ee794 Compare April 11, 2024 09:30
@copybara-service copybara-service bot merged commit 7d3ad17 into main Apr 11, 2024
21 checks passed
@copybara-service copybara-service bot deleted the linen-fix-dense-general-init branch April 11, 2024 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants