tensor.is_inf
tensor.is_inf
Maps infinity to true and other values to false.
Args
self
(@Tensor<T>
) - The input tensor.detect_negative
(Option<u8>
) - Optional Whether map negative infinity to true. Default to 1 so that negative infinity induces true.detect_positive
(Option<u8>
) - Optional Whether map positive infinity to true. Default to 1 so that positive infinity induces true.
Returns
A new Tensor<bool>
instance with entries set to true iff the input tensors corresponding element was infinity.
Examples
Last updated