Skip to content
class

SeluBackward

SeluBackward

Python wrappers

Public Python APIs implemented by this engine symbols.

Autograd node for SELU (Scaled ELU, Klambauer et al. 2017).

Uses the self-normalising constants α≈1.6732632\alpha \approx 1.6732632 and λ≈1.0507010\lambda \approx 1.0507010 baked into the backend; the Python and C++ layers do not expose them to the caller. The backward delegates to the backend because the piecewise scaled-ELU formula depends on those fixed constants.

Math

\alpha\,(e^x - 1), & x < 0 \end{cases}$$ **References** Klambauer et al., "Self-Normalizing Neural Networks", [arXiv:1706.02515](https://arxiv.org/abs/1706.02515).

Attributes

schema_v1OpSchema
"selu", AmpPolicy::ForceFP32.

Static methods

1
static

dispatch

int dispatch(backend::IBackend & be, const int & a, const int & s, Dtype dt)

Forward — calls IBackend::selu to compute the Scaled ELU y=λ xy = \lambda\,x for x≥0x \ge 0 else λ α (ex−1)\lambda\,\alpha\,(e^x - 1).

Methods

2
fn

grad_formula

int grad_formula(const int & g)

Eager-mode backward: dispatches to IBackend::selu_backward.

fn

grad_formula_impl

int grad_formula_impl(const int & g, const int & x, const int & out)