act_method | R Documentation |
Upon a received input, calculates the output based on the selected activation function
act_method(method, x)
method |
Activation function to be used. It must be one of
|
x |
Input value to be used in the activation function. |
Formulae used:
f(x) = \begin{cases}
0 & \text{if } x < \text{threshold} \\
1 & \text{if } x \geq \text{threshold}
\end{cases}
f(x) = \sinh(x)
f(x) = \tanh(x)
x
f(x) = \begin{cases}
x & \text{if } x > 0 \\
0 & \text{if } x \leq 0
\end{cases}
f(x) = \frac{1}{2} \cdot x \cdot \left(1 + \tanh\left(\sqrt{\frac{2}{\pi}} \cdot (x + 0.044715 \cdot x^3)\right)\right)
f(x) = \frac{x}{1 + e^{-x}}
List with the weights of the inputs.
Víctor Amador Padilla, victor.amador@edu.uah.es
# example code
act_method("step", 0.3)
act_method("gelu", 0.7)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.