政协委员是干什么的

paddle. isneginf ( x: Tensor, name: str | None = None ) Tensor [source]
百度 另外面对德拉蒙德,我们今晚的篮板球也没有让他占到太大便宜。

Tests if each element of input is negative infinity or not.

Parameters
  • x (Tensor) – The input Tensor. Must be one of the following types: bfloat16, float16, float32, float64, int8, int16, int32, int64, uint8.

  • name (str|None, optional) – Name for the operation (optional, default is None). For more information, please refer to Name.

Returns

out (Tensor), The output Tensor. Each element of output indicates whether the input element is negative infinity or not.

Examples

>>> import paddle
>>> paddle.set_device('cpu')
>>> x = paddle.to_tensor([-0., float('inf'), -2.1, -float('inf'), 2.5], dtype='float32')
>>> res = paddle.isneginf(x)
>>> print(res)
Tensor(shape=[5], dtype=bool, place=Place(cpu), stop_gradient=True,
[False, False, False, True, False])