aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/kernel_tests
diff options
context:
space:
mode:
authorGravatar Todd Wang <toddw@google.com>2018-09-25 19:13:30 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-09-25 19:19:06 -0700
commit3f4b8c138165cc9deb0ed931c5a6bb3d8ab556f0 (patch)
tree71b16ea76026e41164a3d68a34f71c53cd11a5c0 /tensorflow/python/kernel_tests
parent8adf133448f822fcb866d69ea9d046512836834e (diff)
Remove integer dtypes from Soft{plus,sign} OpDefs.
These ops were never intended to support integer dtypes, and the OpKernels have already been removed in a previous patch. PiperOrigin-RevId: 214542750
Diffstat (limited to 'tensorflow/python/kernel_tests')
-rw-r--r--tensorflow/python/kernel_tests/softplus_op_test.py5
-rw-r--r--tensorflow/python/kernel_tests/softsign_op_test.py5
2 files changed, 4 insertions, 6 deletions
diff --git a/tensorflow/python/kernel_tests/softplus_op_test.py b/tensorflow/python/kernel_tests/softplus_op_test.py
index afe3df6178..e8dc272637 100644
--- a/tensorflow/python/kernel_tests/softplus_op_test.py
+++ b/tensorflow/python/kernel_tests/softplus_op_test.py
@@ -21,7 +21,6 @@ from __future__ import print_function
import numpy as np
from tensorflow.python.framework import constant_op
-from tensorflow.python.framework import errors
from tensorflow.python.ops import gradient_checker
from tensorflow.python.ops import gradients_impl
from tensorflow.python.ops import nn_ops
@@ -125,8 +124,8 @@ class SoftplusTest(test.TestCase):
def testNoInts(self):
with self.cached_session():
with self.assertRaisesRegexp(
- errors.InvalidArgumentError,
- "No OpKernel was registered to support Op 'Softplus'"):
+ TypeError,
+ "'features' has DataType int32 not in list of allowed values"):
nn_ops.softplus(constant_op.constant(7)).eval()
diff --git a/tensorflow/python/kernel_tests/softsign_op_test.py b/tensorflow/python/kernel_tests/softsign_op_test.py
index 05a7c53dee..1b4db9fa46 100644
--- a/tensorflow/python/kernel_tests/softsign_op_test.py
+++ b/tensorflow/python/kernel_tests/softsign_op_test.py
@@ -21,7 +21,6 @@ from __future__ import print_function
import numpy as np
from tensorflow.python.framework import constant_op
-from tensorflow.python.framework import errors
from tensorflow.python.ops import gradient_checker
from tensorflow.python.ops import nn_ops
import tensorflow.python.ops.nn_grad # pylint: disable=unused-import
@@ -69,8 +68,8 @@ class SoftsignTest(test.TestCase):
def testNoInts(self):
with self.cached_session():
with self.assertRaisesRegexp(
- errors.InvalidArgumentError,
- "No OpKernel was registered to support Op 'Softsign'"):
+ TypeError,
+ "'features' has DataType int32 not in list of allowed values"):
nn_ops.softsign(constant_op.constant(7)).eval()