Element-wise bitwise NOT — returns the bit-flipped tensor with the same integer dtype as a.
Not differentiable: output is detached from the autograd graph.
Math
Shape
Output shape equals input shape (elementwise).
Parameters
aTensorImplPtrInput tensor of integer dtype (
Bool, Int8, Int16, Int32, Int64, or unsigned variants). Floating-point dtypes raise an error.Returns
TensorImplPtrNew tensor with the bitwise complement; same shape, dtype, and device as a.
Raises
Errors if ``a`` has a floating-point dtype — bitwise NOT is onlydefined on integers.Notes
Exposed in Python as both invert and bitwise_not (reference
framework alias).