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

optax: Use specific return-type annotations in loss.py #549

Closed
wants to merge 1 commit into from

Conversation

copybara-service[bot]
Copy link

@copybara-service copybara-service bot commented Jul 18, 2023

optax: Use specific return-type annotations in loss.py

Instead of always returning the union type chex.Array, return the more
specific type jnp.ndarray. This makes it easier for users of optax
to write type-correct functions returning jax Arrays.

@copybara-service copybara-service bot changed the title Use specific return-type annotations in loss.py optax: Use specific return-type annotations in loss.py Jul 18, 2023
Instead of always returning the union type chex.Array, return the more
specific type jnp.ndarray. This makes it easier for users of optax
to write type-correct functions returning jax Arrays.

PiperOrigin-RevId: 548880116
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