torch.logical_not — PyTorch 1.10.1 documentation
pytorch.org › docs › stabletorch.logical_not. torch.logical_not(input, *, out=None) → Tensor. Computes the element-wise logical NOT of the given input tensor. If not specified, the output tensor will have the bool dtype. If the input tensor is not a bool tensor, zeros are treated as False and non-zeros are treated as True. Parameters.