Addition (Add)#
API#
- class warp_nn.modules.operators.Add(*, requires_grad: bool = True)[source]#
Bases:
ModuleAddition (Add) operation.
This class computes the element-wise addition of two arrays:
\[\text{Add}(a, b) = a + b\]- Parameters:
requires_grad – Whether the cached output arrays of the module require gradients.
- __call__( ) array[source]#
Forward pass of the operation.
- Parameters:
a – The first input array, with up to 3 dimensions.
b – The second input array, with the same shape and data type as
a.
- Returns:
The output array, with same shape as the input arrays.
- Raises:
ValueError – If the input arrays’ shapes differ.
TypeError – If the input arrays’ data types differ, or if their data type or number of dimensions is not supported.