FCNN4R (version 0.6.2)

mlp_set_activation: Set network activation functions

Description

This function sets activation function (and its slope parameter) for neurons in the hidden layers and in the output layer.

Usage

mlp_set_activation(net, layer, activation = c("threshold", "sym_threshold", "linear", "sigmoid", "sym_sigmoid", "tanh", "sigmoid_approx", "sym_sigmoid_approx"), slope = 0)

Arguments

net
an object of mlp_net class
layer
integer vector or character value, index (indices) of layer(s) whose activation function will be changed or character: "a" denotes all layers, "h" - hidden layer(s), "o" - the output layer
activation
character string, activation function name, admissible options are: "threshold", "sym_threshold", "linear", "sigmoid", "sym_sigmoid" (and "tanh"), "sigmoid_approx", and "sym_sigmoid_approx"
slope
numeric value, activation function slope parameter, if 0 the default parameter value is chosen for each activation function

Value

This function returns network (an object of mlp_net class) with activation function set.