torch_signbit: Signbit

Description Usage Arguments signbit(input, *, out=None) -> Tensor Examples

View source: R/gen-namespace.R

Description

Signbit

Usage

1

Arguments

self

(Tensor) the input tensor.

signbit(input, *, out=None) -> Tensor

Tests if each element of input has its sign bit set (is less than zero) or not.

Examples

1
2
3
4
5
if (torch_is_installed()) {

a <- torch_tensor(c(0.7, -1.2, 0., 2.3))
torch_signbit(a)
}

torch documentation built on Oct. 7, 2021, 9:22 a.m.