Skip to content

Implement softplus#42

Merged
huningxin merged 1 commit intowebmachinelearning:mainfrom
BruceDai:add_softplus
Apr 17, 2023
Merged

Implement softplus#42
huningxin merged 1 commit intowebmachinelearning:mainfrom
BruceDai:add_softplus

Conversation

@BruceDai
Copy link
Copy Markdown
Contributor

@fdwr @huningxin PTAL, thanks.

Copy link
Copy Markdown

@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.

Oh, I hadn't noticed until now that WebNN's softplus is like PyTorch but differs from ONNX's.

WebNN: ln(exp(steepness * x) + 1) / steepness.
ONNX: ln(exp(x) + 1)
PyTorch: log(exp(scale ∗ x)+1) / scale

@huningxin
Copy link
Copy Markdown
Contributor

Oh, I hadn't noticed until now that WebNN's softplus is like PyTorch but differs from ONNX's.

WebNN: ln(exp(steepness * x) + 1) / steepness. ONNX: ln(exp(x) + 1) PyTorch: log(exp(scale ∗ x)+1) / scale

@fdwr , thanks for the good catching. Do you see any issues here?

@fdwr
Copy link
Copy Markdown

fdwr commented Apr 13, 2023

Do you see any issues here?

@huningxin : No issue, just an observation, as WebNN's softplus is directly compatible with PyTorch and a superset of ONNX. If was a subset, then there would be more of an issue.

@huningxin huningxin merged commit 8dcc45e into webmachinelearning:main Apr 17, 2023
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.

3 participants