-
Notifications
You must be signed in to change notification settings - Fork 613
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Exposed the pure python implementation of mish and softshrink. #1252
Conversation
You are owner of some files modified in this pull request. |
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.
LGTM thanks!
from tensorflow_addons.utils import test_utils | ||
|
||
|
||
@test_utils.run_all_in_graph_and_eager_modes | ||
class SoftshrinkTest(tf.test.TestCase, parameterized.TestCase): | ||
def test_invalid(self): | ||
with self.assertRaisesOpError("lower must be less than or equal to upper."): | ||
y = softshrink(tf.ones(shape=(1, 2, 3)), lower=2.0, upper=-2.0) | ||
y = _softshrink_custom_op(tf.ones(shape=(1, 2, 3)), lower=2.0, upper=-2.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.
What's preventing this from being configurable so we can test custom and not custom? The regex for error?
Not blocking this PR but something we might want to aim for being able to do.
…rflow#1252) * Exposed the pure python implementation of mish. * Exposed the pure implementation of softshrink publicly. * Fix name. * The same error is not raise in python and in the custom op.
No description provided.