Python wrappers
Public Python APIs implemented by this engine symbol.Autograd node for the Exponential Linear Unit if else (Clevert et al. 2015).
Like Leaky ReLU, the scalar hyper-parameter is captured on the
node via a custom forward() so the backward kernel sees a concrete
value rather than chasing it through call sites. The piecewise backward
itself is delegated to the backend because the conditional branch is not
expressible through the generic storage primitives.
Math
\qquad \frac{\partial y}{\partial x} = \begin{cases} 1, & x \ge 0 \\ \alpha\,e^x, & x < 0 \end{cases}$$ **References** Clevert, Unterthiner, Hochreiter, "Fast and Accurate Deep Network Learning by Exponential Linear Units (ELUs)", [arXiv:1511.07289](https://arxiv.org/abs/1511.07289).Attributes
schema_v1OpSchema"elu", AmpPolicy::ForceFP32.alpha_doubleNegative-saturation scale captured at forward time; defaults to
1.0.Static methods
2static
cpu_kernel
CpuStorage cpu_kernel(const CpuStorage & a, const int & out_shape, Dtype dt, double alpha)CPU kernel mirroring forward for the dispatcher-driven path.
Custom forward that captures alpha on the backward node.
Parameters
aTensorImplPtrInput activation.
alphadoubleNegative-saturation scale.
Returns
TensorImplPtrForward output with autograd edges wired to EluBackward.