logical_not {rTorch} | R Documentation |
Logical NOT of a tensor
Description
There is not equivalent function in PyTorch for this generic.
To generate This generic we use the function np$logical_not(x)
.
Usage
## S3 method for class 'torch.Tensor'
!x
Arguments
x |
tensor |
Value
A tensor of booleans, where False corresponds to 0, and 1 to True
in a tensor of data type torch$bool
.
Examples
## Not run:
A <- torch$ones(5L)
!A
Z <- torch$zeros(5L)
!Z
## End(Not run)
[Package rTorch version 0.4.2 Index]