Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Feature Request NDArray.has_nan() method #12623

Closed
zhanghang1989 opened this issue Sep 20, 2018 · 3 comments · Fixed by #12967
Closed

Feature Request NDArray.has_nan() method #12623

zhanghang1989 opened this issue Sep 20, 2018 · 3 comments · Fixed by #12967

Comments

@zhanghang1989
Copy link
Contributor

ndarray.has_nan(NDArray) and its convenient form NDArray.has_nan(), which return True if there is nan in the data else return False. This is very helpful in debugging.

Optimally has an option to output the per location prediction ndarray.has_nan(x, gather=True), when gather=False, it should output a binary NDArray with the same shape as x and each location predicts the corresponding data is nan or not.

@zhanghang1989
Copy link
Contributor Author

@mxnet-label-bot [Feature Request, Operator]

@eric-haibin-lin
Copy link
Member

Similarly
NDArray.is_inf() https://www.tensorflow.org/api_docs/python/tf/is_inf

@ChaiBapchya
Copy link
Contributor

Just went through the Debug operators and looks like, there are quite of few of them
https://www.tensorflow.org/api_guides/python/control_flow_ops#Debugging_Operations

1. tf.is_finite
2. tf.is_inf
3. tf.is_nan
4. tf.verify_tensor_all_finite
5. tf.check_numerics
6. tf.add_check_numerics_ops
7. tf.Assert
8. tf.Print

Mostly I will work on that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants