-
Notifications
You must be signed in to change notification settings - Fork 615
add softshrink kernel #570
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
Conversation
WindQAQ
commented
Oct 5, 2019
- Address please add more activation functions #437 - softshrink kernel https://www.gabormelli.com/RKB/Softshrink_Activation_Function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks great. Op looks great, just want to clarify the default lambda
|
||
@keras_utils.register_keras_custom_object | ||
@tf.function | ||
def softshrink(x, lower=-1.0, upper=1.0): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any intuition on defaulting to 1.0
? The link you posted (which references pytorch) has a default of 0.5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also 0.5 default in PaddlePaddle:
https://github.com/PaddlePaddle/Paddle/blob/master/paddle/fluid/operators/activation_op.cc#L251
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably no... It's my mistake on both hardshrink
and softshrink
though I could not find any research paper about the value 0.5
. Will change them to 0.5
later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. Also couldn't find any rationale for 0.5
other than framework defaults.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again!
can not install tensorflow-addons |
ERROR: Could not find a version that satisfies the requirement tensorflow-addons (from versions: none) |
Hi @wangmorgan it's likely that your pip version is too old to find the manylinux2010 pkg. Try running |