Skip to content

Simplify l2 projection - #1394

Merged
copybara-service[bot] merged 1 commit into
mainfrom
test_788081175
Jul 28, 2025
Merged

Simplify l2 projection#1394
copybara-service[bot] merged 1 commit into
mainfrom
test_788081175

Conversation

@copybara-service

Copy link
Copy Markdown

Simplify l2 projection

Previous code ensured that grad(proj_l2ball)(0.0, 1.0) would not be nan.
Present code keeps that behavior but with a simpler approach (the problem was the derivative of the square root, taking the square root after maximum solves the problem).

@copybara-service
copybara-service Bot force-pushed the test_788081175 branch 3 times, most recently from 6bb02e8 to 3dafd06 Compare July 28, 2025 19:01
Previous code ensured that grad(proj_l2ball)(0.0, 1.0) would not be nan.
Present code keeps that behavior but with a simpler approach (the problem was the derivative of the square root, taking the square root after maximum solves the problem).

PiperOrigin-RevId: 788106306
@copybara-service
copybara-service Bot merged commit 8c9a619 into main Jul 28, 2025
@copybara-service
copybara-service Bot deleted the test_788081175 branch July 28, 2025 19:10
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