Skip to content

Commit 56595ec

Browse files
committed
adjust test cases for leaky_relu
1 parent 758b876 commit 56595ec

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

tests/test_backend.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -800,9 +800,9 @@ def test_relu(self):
800800
@skip_caffe2_backend("fails on caffe2 with dim issue")
801801
@check_onnxruntime_incompatibility("Mul")
802802
@check_tf_min_version("1.6")
803-
def test_leaky_relu(self):
803+
def test_leaky_relu_int(self):
804804
# starting from tf 1.6, leaky_relu supports `feature` x of int type
805-
x_types = [np.float32, np.int32, np.int64]
805+
x_types = [np.int32, np.int64]
806806
for x_type in x_types:
807807
x_val = 1000 * np.random.random_sample([1000, 100]).astype(x_type)
808808
for alpha in [0.1, -0.1, 1.0, -1.0]:
@@ -814,9 +814,7 @@ def test_leaky_relu(self):
814814

815815
@skip_caffe2_backend("fails on caffe2 with dim issue")
816816
@check_onnxruntime_incompatibility("Mul")
817-
@check_tf_max_version("1.5")
818-
def test_leaky_relu_old(self):
819-
# for tf_version <= 1.5, leaky_relu requires `feature` x to be of type `float32`
817+
def test_leaky_relu_float(self):
820818
x_val = 1000 * np.random.random_sample([1000, 100]).astype(np.float32)
821819
for alpha in [0.1, -0.1, 1.0, -1.0]:
822820
x = tf.placeholder(x_val.dtype, [None] * x_val.ndim, name=_TFINPUT)

0 commit comments

Comments
 (0)