diff --git a/python/tvm/relay/frontend/tensorflow.py b/python/tvm/relay/frontend/tensorflow.py index d5746a38582c..2c7361a7d813 100644 --- a/python/tvm/relay/frontend/tensorflow.py +++ b/python/tvm/relay/frontend/tensorflow.py @@ -2357,6 +2357,7 @@ def _impl(inputs, attr, params, mod): "Identity": _identity(), "IsFinite": AttrCvt("isfinite"), "IsInf": AttrCvt("isinf"), + "IsNan": AttrCvt("isnan"), "LeakyRelu": AttrCvt("leaky_relu"), "LeftShift": AttrCvt("left_shift"), "Less": _broadcast("less"), diff --git a/tests/python/frontend/tensorflow/test_forward.py b/tests/python/frontend/tensorflow/test_forward.py index d71405796ede..3c30b6662c81 100644 --- a/tests/python/frontend/tensorflow/test_forward.py +++ b/tests/python/frontend/tensorflow/test_forward.py @@ -4178,6 +4178,10 @@ def test_forward_isfinite(): _verify_infiniteness_ops(tf.is_finite, "isfinite") +def test_forward_isnan(): + _verify_infiniteness_ops(tf.is_nan, "isnan") + + def _test_spop_placeholder_without_shape_info(): with tf.Graph().as_default():