|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.computing.ai.neurocomputing.FFNLayer
public abstract class FFNLayer
An abstract class for the feedforward layers.
| Field Summary | |
|---|---|
protected Activation |
activate
The activation function this layer uses. |
protected FFNLayer |
connected
The next layer that this layer is connected to. |
protected FeedForwardNN |
myNetwork
The network this layer belongs to. |
protected double[] |
outputs
The outputs for this layer. |
protected double[][] |
weights
The weights for this layer. |
| Constructor Summary | |
|---|---|
FFNLayer()
Creates a new instance of FFNLayer |
|
| Method Summary | |
|---|---|
void |
connectWith(FFNLayer connect)
Connects this layer with another layer. |
double[] |
getOutput()
Retrieve the outputs for this layer. |
abstract int |
getUnitCount()
Get the number of units in this layer. |
void |
randomizeWeights(double min,
double max)
Randomize the weights between the given range. |
void |
run(double[] input)
Run this layer on the given inputs. |
void |
setNetwork(FeedForwardNN network)
Set the network for this layer. |
void |
setWeights(double[][] newWeights)
Set the weights for this layer. |
void |
setWeights(int unit,
double[] newWeights)
Set the weights for a given units. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected double[] outputs
protected double[][] weights
protected FFNLayer connected
protected FeedForwardNN myNetwork
protected Activation activate
| Constructor Detail |
|---|
public FFNLayer()
| Method Detail |
|---|
public void setNetwork(FeedForwardNN network)
network - the network to be used.public void connectWith(FFNLayer connect)
FeedForwardNN.initialize.
connect - the connecting layer.FeedForwardNN.initialize()public void setWeights(double[][] newWeights)
for (int u=0; u
- Parameters:
newWeights - the new weights.
public void setWeights(int unit,
double[] newWeights)
unit - the unit to set the weights for.newWeights - the new weight array.
public void randomizeWeights(double min,
double max)
min - the range minimum.max - the range maximum.public abstract int getUnitCount()
public double[] getOutput()
public void run(double[] input)
throws NeuralNetworkException
input - the inputs for this layer.
NeuralNetworkException - unused.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||