public backward(inputs as NDArray<T>, upstream as NDArray<T>) as NDArray<T>
Propagates an upstream derivative through the activation.
| Parameter | Description |
|---|---|
inputs | Unmodified pre-activation tensor used in forward. |
upstream | Gradient with the same shape. |
Independent input gradient, zero where inputs are non-positive.
dx = activation.backward(preactivation, upstream)