public class ActivationReLU extends java.lang.Object implements ActivationFunction
| Modifier and Type | Field and Description |
|---|---|
static int |
PARAM_RELU_LOW
The ramp low parameter.
|
static int |
PARAM_RELU_LOW_THRESHOLD
The ramp low threshold parameter.
|
| Constructor and Description |
|---|
ActivationReLU()
Default constructor.
|
ActivationReLU(double thresholdLow,
double low)
Construct a ramp activation function.
|
| Modifier and Type | Method and Description |
|---|---|
void |
activationFunction(double[] x,
int start,
int size)
Implements the activation function.
|
ActivationFunction |
clone()
Clone the object.
|
double |
derivativeFunction(double b,
double a)
Calculate the derivative.
|
java.lang.String |
getFactoryCode() |
java.lang.String |
getLabel() |
double |
getLow() |
java.lang.String[] |
getParamNames() |
double[] |
getParams() |
double |
getThresholdLow() |
boolean |
hasDerivative() |
void |
setLow(double d)
Set the low value.
|
void |
setParam(int index,
double value)
Set one of the params for this activation function.
|
void |
setThresholdLow(double d)
Set the threshold low.
|
public static final int PARAM_RELU_LOW_THRESHOLD
public static final int PARAM_RELU_LOW
public ActivationReLU()
public ActivationReLU(double thresholdLow,
double low)
thresholdLow - The low threshold value.low - The low value, replaced if the low threshold is exceeded.public final void activationFunction(double[] x,
int start,
int size)
activationFunction in interface ActivationFunctionx - The input array to the activation function.start - The starting index.size - The number of values to calculate.public final ActivationFunction clone()
clone in interface ActivationFunctionclone in class java.lang.Objectpublic final double derivativeFunction(double b,
double a)
derivativeFunction in interface ActivationFunctionb - The number to calculate the derivative of, the number "before" the
activation function was applied.a - The number "after" an activation function has been applied.public final double getLow()
public final java.lang.String[] getParamNames()
getParamNames in interface ActivationFunctionpublic final double[] getParams()
getParams in interface ActivationFunctionpublic final double getThresholdLow()
public final boolean hasDerivative()
hasDerivative in interface ActivationFunctionpublic final void setLow(double d)
d - The low value.public final void setParam(int index,
double value)
setParam in interface ActivationFunctionindex - The index of the param to set.value - The value to set.public final void setThresholdLow(double d)
d - The threshold low.public java.lang.String getFactoryCode()
getFactoryCode in interface ActivationFunctionpublic java.lang.String getLabel()
getLabel in interface ActivationFunction