logical_not¶
dragon.vm.torch.
logical_not
(
input,
out=None
)[source]¶Compute the element-wise NOT logical operation.
\[\text{out} = \,\,\sim \text{input} \]Examples:
a = torch.tensor([False, True, True]) b = torch.tensor([0, 1, 2]) print(torch.logical_not(a)) # [True, False, False] print(torch.logical_not(b)) # [True, False, False]
- Parameters:
- input (dragon.vm.torch.Tensor) – The input tensor.
- out (dragon.vm.torch.Tensor, optional) – The output tensor.
- Returns:
dragon.vm.torch.Tensor – The output tensor.