is_finite¶
dragon.math.
is_finite
(
inputs,
**kwargs
)[source]¶Check if the elements of input are finite.
\[\text{out} = \text{isfinite}(\text{input}) \]Examples:
x = dragon.constant([0., float('nan'), float('inf')]) print(dragon.math.is_finite(x)) # [True, False, False]
- Parameters:
- inputs (dragon.Tensor) – The input tensor.
- Returns:
dragon.Tensor – The output tensor.