|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.encog.engine.network.activation.ActivationLinear
public class ActivationLinear
The Linear layer is really not an activation function at all. The input is simply passed on, unmodified, to the output. This activation function is primarily theoretical and of little actual use. Usually an activation function that scales between 0 and 1 or -1 and 1 should be used.
| Field Summary | |
|---|---|
static int |
PARAM_LINEAR_SLOPE
The offset to the parameter that holds the linear slope. |
| Constructor Summary | |
|---|---|
ActivationLinear()
Construct a linear activation function, with a slope of 1. |
|
| Method Summary | |
|---|---|
void |
activationFunction(double[] x,
int start,
int size)
Implements the activation function. |
ActivationFunction |
clone()
|
double |
derivativeFunction(double d)
Calculate the derivative of the activation. |
String |
getOpenCLExpression(boolean derivative)
Returns the OpenCL expression for this activation function. |
String[] |
getParamNames()
|
double[] |
getParams()
|
double |
getSlope()
|
boolean |
hasDerivative()
|
void |
setParam(int index,
double value)
Set one of the params for this activation function. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int PARAM_LINEAR_SLOPE
| Constructor Detail |
|---|
public ActivationLinear()
| Method Detail |
|---|
public ActivationFunction clone()
clone in interface ActivationFunctionclone in class Objectpublic boolean hasDerivative()
hasDerivative in interface ActivationFunctionpublic double getSlope()
public 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 double derivativeFunction(double d)
derivativeFunction in interface ActivationFunctiond - The input array to the activation function.
public String[] getParamNames()
getParamNames in interface ActivationFunctionpublic double[] getParams()
getParams in interface ActivationFunction
public void setParam(int index,
double value)
setParam in interface ActivationFunctionindex - The index of the param to set.value - The value to set.public String getOpenCLExpression(boolean derivative)
getOpenCLExpression in interface ActivationFunctionderivative - True if we want the derivative, false otherwise.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||