Skip to content

Conversation

@BruceDai
Copy link
Contributor

@BruceDai BruceDai commented Apr 7, 2023

@fdwr @Honry @dontcallmedom PTAL, thanks.

0.962285784541856,
0.2570918415891237,
0.5411237762597576,
-0.7982109817680292,
Copy link

Choose a reason for hiding this comment

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

Beware that mixing negative and positive numbers in addition can cause subtraction of nearly equal numbers, meaning catastrophic cancellation and potentially exceeding the ULP. Consider using positive inputs here and other cases. Similarly using a negative scale with positive beta could yield the same issue (unless the inputs were negative, in which case the inputs and scale would cancel signs, and so that would be fine).

clamp(a * alpha + beta, 0, 1)); defaults alpha = 0.2, beta = 0.5

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done to update test data to avoid catastrophic cancellation, please take another look, thanks! @fdwr

@BruceDai BruceDai force-pushed the add_webnn_hardSigmoid_tests branch from e362ff9 to 80536cf Compare April 20, 2023 05:27
@BruceDai BruceDai force-pushed the add_webnn_hardSigmoid_tests branch from 80536cf to 89e1982 Compare April 20, 2023 05:34
Copy link

@fdwr fdwr left a comment

Choose a reason for hiding this comment

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

👍

@Honry Honry merged commit 9f3cd8c into web-platform-tests:master Apr 25, 2023
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.

6 participants