Skip to content

Commit 1914e78

Browse files
committed
Add SELU documentation
1 parent ef6e3e6 commit 1914e78

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed

doc/specs/stdlib_specialfunctions_activations.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,74 @@ Elemental function
300300

301301
The function returns a value with the same type and kind as input argument.
302302

303+
## `Selu` - Scaled Exponential Linear Unit function
304+
305+
### Status
306+
307+
Experimental
308+
309+
### Description
310+
311+
Applies the Scaled Exponential Linear Unit activation function:
312+
$$
313+
f(x) =
314+
\begin{cases}
315+
scale * x, & \text{if } x \ge 0 \\
316+
scale * (\alpha * exp(x) - \alpha ), & \text{otherwise}
317+
\end{cases}
318+
$$
319+
Where,
320+
$$scale = 1.0507009873554804934193349852946 \text{and} \alpha = 1.6732632423543772848170429916717$$
321+
322+
### Syntax
323+
324+
`result = ` [[stdlib_specialfunctions(module):selu(interface)]] ` (x)`
325+
326+
### Class
327+
328+
Elemental function
329+
330+
### Arguments
331+
332+
`x`: Shall be a scalar or array of any `real` kind.
333+
334+
### Return value
335+
336+
The function returns a value with the same type and kind as input argument.
337+
338+
## `selu_grad` - Gradient of the Scaled Exponential Linear Unit function
339+
340+
### Status
341+
342+
Experimental
343+
344+
### Description
345+
346+
Applies the gradient of the Scaled Exponential Linear Unit activation function:
347+
$$
348+
f(x) =
349+
\begin{cases}
350+
scale, & \text{if } x \ge 0 \\
351+
scale * \alpha * exp(x) , & \text{otherwise}
352+
\end{cases}
353+
$$
354+
355+
### Syntax
356+
357+
`result = ` [[stdlib_specialfunctions(module):selu_grad(interface)]] ` (x)`
358+
359+
### Class
360+
361+
Elemental function
362+
363+
### Arguments
364+
365+
`x`: Shall be a scalar or array of any `real` kind.
366+
367+
### Return value
368+
369+
The function returns a value with the same type and kind as input argument.
370+
303371
## `Sigmoid` - Sigmoid function
304372

305373
### Status

0 commit comments

Comments
 (0)