Bitwise NOT (BitwiseNot)#

API#

class warp_nn.modules.operators.BitwiseNot[source]#

Bases: Module

Bitwise NOT (BitwiseNot) operation.

This class computes the element-wise bitwise NOT (one’s complement) of integer arrays:

\[\text{BitwiseNot}(x) = \sim x\]

Integer operations are not differentiable, so the output arrays never require gradients.

__call__(
input: array,
) → array[source]#

Forward pass of the operation.

Parameters:

input – The input array, with up to 3 dimensions.

Returns:

The output array, with same shape as the input array.

Raises:

TypeError – If the input array’s data type or number of dimensions is not supported.