sklvq.activations.ActivationBaseClass¶
-
class
sklvq.activations.ActivationBaseClass[source]¶ Activation base class
Abstract class for implementing activation functions. Provides abstract methods with expected call signatures.
Custom activation function ‘__init__’ should accept any parameters as key-value pairs.
-
abstract
__call__(x: numpy.ndarray) → numpy.ndarray[source]¶ Should implement an activation function
- Parameters
- xndarray of any shape
- Returns
- ndarray of shape (x.shape)
Should perform an elementwise evaluation of some activation function.
-
abstract
gradient(x: numpy.ndarray) → numpy.ndarray[source]¶ Should implement the activation function’s gradient
- Parameters
- xndarray of any shape
- Returns
- ndarray of shape (x.shape)
Should return the elementwise evaluation of the activation function’s gradient.
-
abstract