public class GenericTransferLayer extends Object implements TransferLayer, Serializable
TransferLayer interface.| Constructor and Description |
|---|
GenericTransferLayer(int neuronCount,
Function transferFunc)
Creates a new layer with specified number of neurons and transfer
function.
|
| Modifier and Type | Method and Description |
|---|---|
void |
activate()
Performs calculations for this layer.
|
double |
getBias(int neuron)
Returns the bias value of the specified neuron.
|
double |
getInput(int neuron)
Returns the value of net input of the specified neuron.
|
int |
getNeuronCount()
Returns the number of neurons in this layer.
|
double |
getOutput(int neuron)
Returns the value of the output of the specified neuron.
|
Function |
getTransferFunc()
Returns the activation function of this layer.
|
void |
init(LayerInitializer initializer)
Initializes this layer using the provided initializer.
|
void |
setBias(int neuron,
double value)
Sets the bias value for the specified neuron.
|
void |
setTransferFunc(Function function)
Sets the transfer function for this layer.
|
void |
stimulate(int neuron,
double value)
Stimulates specified neuron with the given value.
|
String |
toString() |
public GenericTransferLayer(int neuronCount,
Function transferFunc)
neuronCount - the number of neurons in the layertransferFunc - the activatoin function of the layerpublic int getNeuronCount()
LayergetNeuronCount in interface Layerpublic double getInput(int neuron)
Layerpublic double getOutput(int neuron)
Layerpublic void setTransferFunc(Function function)
TransferLayersetTransferFunc in interface TransferLayerfunction - the transfer functionpublic Function getTransferFunc()
getTransferFunc in interface TransferLayerpublic double getBias(int neuron)
TransferLayergetBias in interface TransferLayerneuron - the index of the neuronpublic void setBias(int neuron,
double value)
TransferLayersetBias in interface TransferLayerneuron - the index of the neuronvalue - the bias valuepublic void stimulate(int neuron,
double value)
public void activate()
Layerpublic void init(LayerInitializer initializer)
Layerinitializer.init(this).Copyright © 2012. All Rights Reserved.