java.lang.Object
org.ojalgo.ann.ArtificialNeuralNetwork
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumhttps://en.wikipedia.org/wiki/Activation_functionstatic enum -
Method Summary
Modifier and TypeMethodDescriptionstatic NetworkBuilderbuilder(int numberOfNetworkInputNodes) static NetworkTrainerbuilder(int numberOfInputNodes, int... nodesPerCalculationLayer) Deprecated.static NetworkBuilderbuilder(PhysicalStore.Factory<Double, ?> factory, int numberOfNetworkInputNodes) static NetworkTrainerbuilder(PhysicalStore.Factory<Double, ?> factory, int numberOfInputNodes, int... nodesPerCalculationLayer) Deprecated.intdepth()booleanstatic ArtificialNeuralNetworkRead (reconstruct) an ANN from the specified input previously written bywriteTo(DataOutput).static ArtificialNeuralNetworkstatic ArtificialNeuralNetworkfrom(Path path, OpenOption... options) static ArtificialNeuralNetworkfrom(PhysicalStore.Factory<Double, ?> factory, DataInput input) Read (reconstruct) an ANN from the specified input previously written bywriteTo(DataOutput).static ArtificialNeuralNetworkfrom(PhysicalStore.Factory<Double, ?> factory, File file) static ArtificialNeuralNetworkfrom(PhysicalStore.Factory<Double, ?> factory, Path path, OpenOption... options) getActivator(int layer) doublegetBias(int layer, int output) doublegetWeight(int layer, int input, int output) inthashCode()With batch size 1newInvoker(int batchSize) If you create multiple invokers you can use them in different threads simutaneously - the invoker contains any/all invocation specific state.With batch size 1newTrainer(int batchSize) Only 1 trainer at the time.toString()intwidth()voidwriteTo(DataOutput output) Will write (save) the ANN to the specified output.voidvoidwriteTo(Path path, OpenOption... options)
-
Method Details
-
builder
-
builder
@Deprecated public static NetworkTrainer builder(int numberOfInputNodes, int... nodesPerCalculationLayer) Deprecated.Usebuilder(int)instead -
builder
public static NetworkBuilder builder(PhysicalStore.Factory<Double, ?> factory, int numberOfNetworkInputNodes) -
builder
@Deprecated public static NetworkTrainer builder(PhysicalStore.Factory<Double, ?> factory, int numberOfInputNodes, int... nodesPerCalculationLayer) Deprecated. -
from
Read (reconstruct) an ANN from the specified input previously written bywriteTo(DataOutput).- Throws:
IOException
-
from
- See Also:
-
from
- See Also:
-
from
public static ArtificialNeuralNetwork from(PhysicalStore.Factory<Double, ?> factory, DataInput input) throws IOExceptionRead (reconstruct) an ANN from the specified input previously written bywriteTo(DataOutput).- Throws:
IOException
-
from
- See Also:
-
from
public static ArtificialNeuralNetwork from(PhysicalStore.Factory<Double, ?> factory, Path path, OpenOption... options) - See Also:
-
depth
public int depth()- Returns:
- The number of calculation layers
-
equals
-
getActivator
-
getBias
public double getBias(int layer, int output) -
getWeight
public double getWeight(int layer, int input, int output) -
hashCode
public int hashCode() -
newInvoker
With batch size 1- See Also:
-
newInvoker
If you create multiple invokers you can use them in different threads simutaneously - the invoker contains any/all invocation specific state.- Parameters:
batchSize- The batch size - the number of batched invocations- Returns:
- The invoker
-
newTrainer
With batch size 1- See Also:
-
newTrainer
Only 1 trainer at the time.- Parameters:
batchSize- The batch size - the number of batched training examples- Returns:
- The trainer
-
structure
-
toString
-
width
public int width()- Returns:
- The max number of nodes in any layer
-
writeTo
Will write (save) the ANN to the specified output. Can then later be read back by usingfrom(DataInput).- Throws:
IOException
-
writeTo
- See Also:
-
writeTo
- See Also:
-
builder(int)instead