-
Notifications
You must be signed in to change notification settings - Fork 46
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
Need to restrict the value of alpha to be positive for elu operation #383
Comments
Thanks for opening this issue, @lisa0314 ! The quick survey of the native ML APIs support:
|
When
I think the decomposition sample in current spec still works for negative return builder.add(
builder.max(builder.constant(0), x),
builder.mul(
builder.constant(-1), // alpha = -1
builder.sub(
builder.exp(builder.min(builder.constant(0), x)),
builder.constant(1)))); (BTW, there is a typo in the elu sample code, I'll fix it.) |
@huningxin: Doh, fixed graph. 👍 Yep, you're right, because the scale multiply occurs after the min, the existing decomposition works fine. I think |
A summary of Chromium prototyping:
|
IIRC, we agreed to close this one in TPAC2024? |
Yes, discussion at https://www.w3.org/2024/09/23-webmachinelearning-minutes.html#e89f |
According to the elu definition of wikipedia and the paper, the alpha should be positive.
This issue was raised by @huningxin in WebNN Chromium CL review. Thanks Ningxin!
The text was updated successfully, but these errors were encountered: