Package me.damoebe.architectures.mlp
Klasse FFNetwork
java.lang.Object
me.damoebe.architectures.Network
me.damoebe.architectures.mlp.FFNetwork
- Bekannte direkte Unterklassen:
DeepNetwork,EvolutionNetwork
The abstract class for FFNeuralNetworks
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungprotected doubleThe current loss of the networkThe whole network in a listprotected final doubleprotected doubleThe configured noise of the network -
Konstruktorübersicht
KonstruktorenModifiziererKonstruktorBeschreibungprotectedFFNetwork(int inputSize, int outputSize, int hiddenLayerSize, int hiddenLayerAmount) FFNetwork constructor for networks without a learning rate - 0.0 (for example evolution learning)protectedFFNetwork(int inputSize, int outputSize, int hiddenLayerSize, int hiddenLayerAmount, double learningRate) The main constructor of a FFNetwork -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungabstract FFNetworkclone()A method for cloning a FFNetwork objectstatic LayergenerateLayer(int size, Layer prevLayer) Generates a new layer for the FFNetwork constructorintA Getter for the amount of hidden-layers in this networkintA Getter for the size of the middle layers sizeintA Getter for the size of the first layer's sizeGetter for the layer-list of this networkabstract doubleGets the network lossGets all output activationsintA Getter for the size of the last layer's sizevoidinsertInput(List<Double> input) Inserts input activations into the networkvoidsetNoise(double noise) Sets the network noise.abstract voidThe abstract train functionvoidCalls the updatedActivation() function for each neuron in the networkvoidupdateLoss(List<Double> optimalOutput) Updates the network loss based on a targetActivation listVon Klasse geerbte Methoden me.damoebe.architectures.Network
loadNetworkFromJson, loadToJsonFile
-
Felddetails
-
layers
-
currentLoss
protected double currentLossThe current loss of the network -
noise
protected double noiseThe configured noise of the network -
learningRate
protected final double learningRate
-
-
Konstruktordetails
-
FFNetwork
protected FFNetwork(int inputSize, int outputSize, int hiddenLayerSize, int hiddenLayerAmount, double learningRate) The main constructor of a FFNetwork- Parameter:
inputSize- The size of the first layeroutputSize- The size of the last layerhiddenLayerSize- The size of the hiddenlayershiddenLayerAmount- The amount of hiddenlayers that should be generated
-
FFNetwork
protected FFNetwork(int inputSize, int outputSize, int hiddenLayerSize, int hiddenLayerAmount) FFNetwork constructor for networks without a learning rate - 0.0 (for example evolution learning)- Parameter:
inputSize- The size of the first layeroutputSize- The size of the last layerhiddenLayerSize- The size of the hiddenlayershiddenLayerAmount- The amount of hiddenlayers that should be generated
-
-
Methodendetails
-
clone
-
generateLayer
Generates a new layer for the FFNetwork constructor- Parameter:
size- The amount of neurons that layer should containprevLayer- The previous Layer in the network (null if there is no previous layer)- Gibt zurück:
- A new Layer that points to the previous layer
-
updateAllActivations
public void updateAllActivations()Calls the updatedActivation() function for each neuron in the network- Angegeben von:
updateAllActivationsin KlasseNetwork
-
insertInput
Inserts input activations into the network- Angegeben von:
insertInputin KlasseNetwork- Parameter:
input- A Double ArrayList containing the neuron activations.
-
updateLoss
-
getOutput
-
setNoise
public void setNoise(double noise) Sets the network noise.- Parameter:
noise- The new noise of the network.
-
getInputSize
public int getInputSize()A Getter for the size of the first layer's size- Gibt zurück:
- The input-layer size
-
getOutputSize
public int getOutputSize()A Getter for the size of the last layer's size- Gibt zurück:
- The output-layer size
-
getHiddenLayerSize
public int getHiddenLayerSize()A Getter for the size of the middle layers size- Gibt zurück:
- The size of the hidden layers
-
getHiddenLayerAmount
public int getHiddenLayerAmount()A Getter for the amount of hidden-layers in this network- Gibt zurück:
- The hidden-layer amount
-
train
-
getNetworkLoss
public abstract double getNetworkLoss()Gets the network loss- Gibt zurück:
- The network loss double
-
getLayers
-