Interface ActivationFunction
public interface ActivationFunction
An interface for activation functions.
-
Method Summary
-
Method Details
-
forward
linalg.Matrix forward(linalg.Matrix data)Applies the forward pass of activation function to a matrix.- Parameters:
data
- The matrix to apply activation function to.- Returns:
- The result of the element-wise activation function applied to the matrix.
-
back
linalg.Matrix back(linalg.Matrix data)Applies backward pass of the activation function to a matrix (i.e. the derivative).- Parameters:
data
- The matrix to apply the derivative of the activation function with respect to weights.- Returns:
- The backward pass of the activation function for the data matrix.
-
getName
String getName()Gets the name of the activation function.- Returns:
- The name of the activation function as a String.
-