logical_not: Logical NOT of a tensor

Description Usage Arguments Value Examples

Description

There is not equivalent function in PyTorch for this generic. To generate This generic we use the function np$logical_not(x).

Usage

1
2
## 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

1
2
3
4
5
6
7
8
## Not run: 
A <- torch$ones(5L)
!A

Z <- torch$zeros(5L)
!Z

## End(Not run)

rTorch documentation built on Jan. 13, 2021, 4:32 p.m.