squash: Squash

Description Usage Arguments Functions Squashing functions See Also Examples

Description

Squash functions, more commonly known as activation functions.

Set activation functions for your layers.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41

Arguments

func

A squashing functions name.

x

A vector of integer.

print

If TRUE prints the equation.

plot

if TRUE plots the activation and the derivate.

brain

An object of class brain as returned by brain.

squash

A object of class squash as returned by squash_function.

bias

A bias, numerical.

Functions

Squashing functions

logistic also known as sigmoid

tanh
tanh

identity
identity

relu
relu

step or hlim (hard limit function)
step

softsign

sinusoid
sinusoid

gaussian
gaussian

bent_identity
bent\_identity

bipolar
bipolar

bipolar_sigmoid
bipolar\_sigmoid

hard_tanh
hard\_tanh

absolute
absolute

inverse
inverse

See Also

squash_function for valid activation functions.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
run_squash("tanh")

(x <- seq(-10, 10, by = .2))
run_squash("sigmoid", x)

brain() %>%
  perceptron(c(2,3,1)) %>%
  squash_input(
    squash_function("tanh")
  )

brain-r/brain documentation built on May 21, 2019, 4:05 a.m.