Skip to content

Relax gradient assertion for mish activation #1415

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

Merged
merged 1 commit into from
Mar 26, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions tensorflow_addons/activations/mish_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ def test_theoretical_gradients(self, dtype):

@pytest.mark.parametrize("dtype", [np.float32, np.float64])
def test_same_as_py_func(dtype):
if dtype == np.float32 and tf.__version__ == "2.2.0-rc1":
pytest.skip("TODO: fix for tf 2.2.0")
np.random.seed(1234)
for _ in range(20):
verify_funcs_are_equivalent(dtype)
Expand All @@ -70,7 +68,7 @@ def verify_funcs_are_equivalent(dtype):
grad_native = t.gradient(y_native, x)
grad_py = t.gradient(y_py, x)

test_utils.assert_allclose_according_to_type(grad_native, grad_py)
test_utils.assert_allclose_according_to_type(grad_native, grad_py, atol=1e-5)


if __name__ == "__main__":
Expand Down