Skip to content

Commit a938af2

Browse files
committed
fix errors and update code based on review comments
1 parent 0cced88 commit a938af2

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

tests/test_backend.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1702,10 +1702,10 @@ def test_zeros_like(self):
17021702
_ = tf.identity(res1, name=_TFOUTPUT1)
17031703
self._run_test_case([_OUTPUT, _OUTPUT1], {_INPUT: input_val})
17041704

1705-
@check_opset_min_version(9, "isnan")
1705+
@check_opset_min_version(9, "is_nan")
17061706
def test_isnan(self):
17071707
# only compatible with dtype `float32`
1708-
x_val1 = np.array([1.0, 2.0, -3.0, -4.0], dtype=np.float32).reshape((2,2))
1708+
x_val1 = np.array([1.0, 2.0, -3.0, -4.0], dtype=np.float32).reshape((2, 2))
17091709
x_val2 = np.array([np.nan, np.nan, np.nan, np.nan], dtype=np.float32).reshape((2, 2))
17101710
x_val3 = np.array([1.0, np.nan, -3.0, np.nan], dtype=np.float32).reshape((2, 2))
17111711
for x_val in [x_val1, x_val2, x_val3]:

tf2onnx/tfonnx.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1894,18 +1894,19 @@ def where_op(ctx, node, name, args):
18941894
}
18951895

18961896
_OPSET_9 = {
1897-
"Erf": (direct_op, []),
1898-
"Fill": (fill_op, []),
1899-
"Sinh": (direct_op, []),
1900-
"Cosh": (direct_op, []),
1901-
"Asinh": (direct_op, []),
19021897
"Acosh": (direct_op, []),
1898+
"Asinh": (direct_op, []),
19031899
"Atanh": (direct_op, []),
1900+
"Cosh": (direct_op, []),
1901+
"Erf": (direct_op, []),
1902+
"Fill": (fill_op, []),
19041903
"Greater": (logical_compare_op, []),
1904+
"IsNan": (direct_op, ["IsNaN"])
19051905
"Less": (logical_compare_op, []),
19061906
"ResizeBilinear": (upsample_op9, ["Upsample", "linear"]),
19071907
"ResizeNearestNeighbor": (upsample_op9, ["Upsample", "nearest"]),
19081908
"Where": (where_op, []),
1909+
"Sinh": (direct_op, []),
19091910
}
19101911

19111912
_OPSETS = [

0 commit comments

Comments
 (0)