protected static class NetCompiler.BooneCompiledNet extends java.lang.Object implements NetCompiler.CompiledNet
| Modifier and Type | Field and Description |
|---|---|
protected Function[] |
activationFn
Activation function.
|
protected double[] |
bias
Neuron biases.
|
protected int |
calcOrder
Calculation order.
|
protected boolean[] |
directed
Flag whether this link is directed.
|
protected double[] |
externalInput
the external input signal, meant for the input of input neurons.
|
protected double[] |
input
Current input signal.
|
protected int[] |
inputNeurons
Indices of the input neurons, in the correct order.
|
protected double[] |
linkInput
The sum of the inputs from the links to this neuron.
|
protected int[] |
linkSinkNeuron
Sink neurons of the links.
|
protected int[] |
linkSourceNeuron
Source neurons of the links.
|
protected boolean[] |
loopOutputToInput
Loop back output to the linkInput after every cycle? Default: false.
|
protected int |
maxCycles
max number of network cycles, usually just 1.
|
protected int |
numInputNeurons
Number of input neurons.
|
protected int |
numLinks
Number of links.
|
protected int |
numNeurons
Total number of neurons.
|
protected int |
numOutputNeurons
Number of output neurons.
|
protected int[][] |
outLinks
Array of arrays of links from the given neuron to other neurons.
|
protected double[] |
output
Current unit output.
|
protected int[] |
outputNeurons
Indices of the output neurons, in the correct order.
|
protected int[] |
tickList
Tick list, for random calculation order.
|
protected boolean[] |
usingBias
Am I using the bias? Default: true.
|
protected double[] |
value
Link value.
|
protected double[] |
weight
Weight of this link.
|
protected boolean |
zeroInputAfterFirstCycle
Reset the external input of the input neurons to zero after the first cycle
when innervating the network? Probably only useful for recurrent networks,
where the internal per-neuron feed-back should take over
(see
Neuron.loopOutputToInput). |
| Modifier | Constructor and Description |
|---|---|
protected |
BooneCompiledNet() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
calculateNeuron(int neuron)
Calculate the given neuron.
|
NetCompiler.CompiledNet |
compile(NeuralNet net)
Compile the given network into this compiled net.
|
double[] |
getOutput(double[] outputs)
Extract the output pattern from the network.
|
void |
innervate()
Innervate the network.
|
protected void |
innervateCycle(int cycle)
Innervate the network for a single cycle.
|
protected void |
propagateLink(int link,
double output,
boolean forwardDirection)
Propagate the given link.
|
protected void |
propagateNeuronOutput(int neuron)
Propagate the given neuron's output.
|
void |
setInput(double[] values)
Load the input pattern into the network.
|
protected int numNeurons
protected int numInputNeurons
protected int[] inputNeurons
protected int numOutputNeurons
protected int[] outputNeurons
protected int numLinks
protected Function[] activationFn
protected boolean[] usingBias
protected boolean[] loopOutputToInput
protected double[] bias
protected double[] externalInput
protected double[] linkInput
propagateLink(int, double, boolean) method. protected double[] input
calculateNeuron(int) method by adding the linkInput and the
externalInput values.protected double[] output
protected int[][] outLinks
protected int[] linkSourceNeuron
protected int[] linkSinkNeuron
protected double[] weight
protected double[] value
protected boolean[] directed
protected int maxCycles
protected boolean zeroInputAfterFirstCycle
Neuron.loopOutputToInput).Default: false.
protected int calcOrder
protected int[] tickList
public void setInput(double[] values)
setInput in interface NetCompiler.CompiledNetpublic void innervate()
innervate in interface NetCompiler.CompiledNetprotected void innervateCycle(int cycle)
cycle - the current cycleprotected void calculateNeuron(int neuron)
Neuron.calculate()protected void propagateNeuronOutput(int neuron)
Neuron.propagateOutput()protected void propagateLink(int link,
double output,
boolean forwardDirection)
Link.propagate().public double[] getOutput(double[] outputs)
getOutput in interface NetCompiler.CompiledNetoutputs - Array to put the outputs into.
If too small or null, we allocate a new double array for the values.public NetCompiler.CompiledNet compile(NeuralNet net) throws NetCompiler.CompileException
compile in interface NetCompiler.CompiledNetNetCompiler.CompileException