-
Notifications
You must be signed in to change notification settings - Fork 60
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
Integration of HardSigmoid Operation #185
Conversation
@ariaghora looks good to me! Two things before I can merge this:
|
@pixelspark nice! Few things to clarify:
|
Yes and yes! (And no need to enable the test if there is none of course. If it fails for some reason but the op is still useful, just leave the test disabled and make a note somewhere) Shape inference is not too difficult to implement, I assume you can just add this op in the list with other ops that take one input and provide one output with exactly the same shape. Then of course you can insert two checkmarks in the readme. |
Other changes: - Update repo README.md to indicate support for hardsigmoid - Rename `hard_sigmoid` to `hardsigmoid` in few places to be consistent with onnx standard
@pixelspark Yes, it gives an output with the same shape as the input. I put two checkmarks. One more thing: some tests failed due to unimplemented
Other than that, I guess it is ready. |
I think |
I disabled the tests. (off-topic: is CastLike being implemented now? I might be able to help on this.) |
OK, will run CI and then merge. Thanks!
Not as far as I know, feel free to go ahead! |
This pull request introduces the HardSigmoid operation into the existing framework.
Motivation:
Several recent and good-performing OCR models (such as those found in PaddleOCR) utilize ConvTranspose and HardSigmoid. The ConvTranspose PR (#182) is currently in progress, and with anticipation for its completion, I decided to help implementing HardSigmoid part.
Changes:
wonnx/src/compiler.rs
wonnx/templates/snippets/activation_scalar.wgsl
andwonnx/templates/snippets/activation_vec.wgsl
(not sure whether I should implement for both files, but modified both, anyway)wonnx/tests/hard_sigmoid.rs
as I was not sure where to put tests for activation function like thisPlease review the changes and merge if you're OK. Feel free to request any modifications if necessary.