Round#
API#
- class warp_nn.modules.operators.Round(*, requires_grad: bool = True)[source]#
Bases:
ModuleRound operation.
This class computes the element-wise rounding to the nearest integer:
\[\text{Round}(x) = \text{round}(x)\]Halfway cases are rounded to the nearest even integer (e.g. 0.5 is rounded to 0, and 1.5 to 2).
- Parameters:
requires_grad – Whether the cached output arrays of the module require gradients.