activations <- dplyr::tribble(
~func, ~eq,
"logistic", "1 / (1 + e ^ -x)",
"tanh", "(2 / (1 + e ^ (2 * x))) - 1",
"relu", "0 if x < 0; x if x >= 0",
"identity", "x",
"step", "0 if x < 0; 1 if x >= 0",
"softsign", "x / (1 + |x|)",
"sinusoid", "sin(x)",
"gaussian", "e ^ (-x ^ 2)",
"bent_identity", "((sqrt(x ^ 2 + 1) - 1) / 2) + x",
"bipolar", "-1 if x <= 0; 1 if 1 > 0",
"bipolar_sigmoid","(2 / (1 + e ^ -x)) - 1",
"hard_tanh", "max(-1, min(1, x))",
"absolute", "|x|",
"inverse", "1 - x"
)
usethis::use_data(activations, internal = TRUE, overwrite = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.