new ActivationFunction(func, dfunc)
Container for the neural network activation function and its derivative
- Source:
- See:
-
- sigmoid tanh
Parameters:
Name | Type | Description |
---|---|---|
func |
Activation function | |
dfunc |
Derivative of the activation function |
Example
const softStep = new ActivationFunction(
x => 1 / (1 + Math.exp(x)),
x => this.func(x) * (1 - this.func(x))
)