Skip to content

Conversation

carlosgmartin
Copy link
Contributor

@carlosgmartin carlosgmartin commented Jun 27, 2025

Edits code to use already-existent tree utility functions, where possible.

@carlosgmartin carlosgmartin force-pushed the minor_improvements_using_tree_utils branch from de7cdd1 to f65f87c Compare June 27, 2025 02:35
@carlosgmartin carlosgmartin changed the title Apply minor improvements using tree utility functions. Deprecate optax.global_norm in favor of optax.tree.norm. Minor improvements and cleanup Jun 27, 2025
@carlosgmartin carlosgmartin force-pushed the minor_improvements_using_tree_utils branch from f65f87c to b1d4b63 Compare June 27, 2025 03:00
@vroulet
Copy link
Collaborator

vroulet commented Jun 27, 2025

Make it three PRs :)
For optax.global_norm vs optax.tree.norm, just to be extra-sure (since that optax.global_norm is used a lot), can you make sure that their hlos match?
For tree.norm, keep the same signature as jnp.linalg.norm (that's what users will probably expect.)

@carlosgmartin
Copy link
Contributor Author

@carlosgmartin carlosgmartin changed the title Minor improvements and cleanup Minor improvements and cleanup using tree utility functions. Jun 27, 2025
@carlosgmartin carlosgmartin force-pushed the minor_improvements_using_tree_utils branch from 40ca000 to e0f0add Compare July 2, 2025 01:44
@carlosgmartin carlosgmartin force-pushed the minor_improvements_using_tree_utils branch from e0f0add to a571029 Compare July 2, 2025 01:57
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.

2 participants