maybe_check_numerics¶
-
tfsnippet.utils.
maybe_check_numerics
(tensor, message, name=None)¶ If
tfsnippet.settings.check_numerics == True
, check the numerics of tensor. Otherwise do nothing.Parameters: - tensor – The tensor to be checked.
- message – The message to display when numerical issues occur.
- name (str) – Default name of the name scope. If not specified, generate one according to the method name.
Returns: The tensor, whose numerics have been checked.
Return type: tf.Tensor