powered by
There is not equivalent function in PyTorch for this generic. To generate This generic we use the function np$logical_not(x).
np$logical_not(x)
# S3 method for torch.Tensor !(x)
tensor
A tensor of booleans, where False corresponds to 0, and 1 to True in a tensor of data type torch$bool.
torch$bool
# NOT RUN { A <- torch$ones(5L) !A Z <- torch$zeros(5L) !Z # }
Run the code above in your browser using DataLab