Der2ActFunc: Second derivative of activation function of neuron

View source: R/ActFunc.R

Der2ActFuncR Documentation

Second derivative of activation function of neuron

Description

Evaluate second derivative of activation function of a neuron

Usage

Der2ActFunc(type = "sigmoid", ...)

Arguments

type

character name of the activation function

...

extra arguments needed to calculate the functions

Value

numeric output of the neuron

Examples

# Return derivative of the sigmoid activation function of a neuron
ActivationFunction <- Der2ActFunc("sigmoid")
# Return derivative of the tanh activation function of a neuron
ActivationFunction <- Der2ActFunc("tanh")
# Return derivative of the activation function of several layers of neurons
actfuncs <- c("linear","sigmoid","linear")
ActivationFunctions <- sapply(actfuncs, Der2ActFunc)

NeuralSens documentation built on June 22, 2024, 12:06 p.m.