Package org.ojalgo.ann
Class NetworkTrainer
java.lang.Object
org.ojalgo.ann.WrappedANN
org.ojalgo.ann.NetworkTrainer
- All Implemented Interfaces:
Supplier<ArtificialNeuralNetwork>
An Artificial Neural Network (ANN) builder/trainer.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final TrainingConfiguration
private final PhysicalStore<Double>[]
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionactivator
(int layer, ArtificialNeuralNetwork.Activator activator) Deprecated.activators
(ArtificialNeuralNetwork.Activator activator) Deprecated.UseNetworkBuilder
andNetworkBuilder.layer(int, Activator)
instead.activators
(ArtificialNeuralNetwork.Activator... activators) Deprecated.UseNetworkBuilder
andNetworkBuilder.layer(int, Activator)
instead.bias
(int layer, int output, double bias) dropouts()
boolean
(package private) double
int
hashCode()
lasso
(double factor) L1 lasso regularisationrate
(double rate) ridge
(double factor) L2 ridge regularisationtoString()
void
train
(Iterable<? extends Access1D<Double>> givenInputs, Iterable<? extends Access1D<Double>> targetOutputs) Deprecated.Just usetrain(Access1D, Access1D)
insteadvoid
The arguments are typed asAccess1D
but it's probably best to think of (create) them as something 2D where the number of rows should match the batch size and the number of columns the number of inputs and outputs respectively.weight
(int layer, int input, int output, double weight) Methods inherited from class org.ojalgo.ann.WrappedANN
adjust, depth, get, getActivator, getBatchSize, getBias, getInput, getInput, getOutput, getOutput, getOutputActivator, getWeight, getWeights, invoke, newInputBatch, randomise, setActivator, setBias, setWeight
-
Field Details
-
myConfiguration
-
myGradients
-
-
Constructor Details
-
NetworkTrainer
NetworkTrainer(ArtificialNeuralNetwork network, int batchSize)
-
-
Method Details
-
activator
Deprecated.UseNetworkBuilder
andNetworkBuilder.layer(int, Activator)
instead.- Parameters:
layer
- 0-based index among the calculation layers (excluding the input layer)activator
- The activator function to use
-
activators
Deprecated.UseNetworkBuilder
andNetworkBuilder.layer(int, Activator)
instead. -
activators
Deprecated.UseNetworkBuilder
andNetworkBuilder.layer(int, Activator)
instead. -
bias
-
dropouts
-
equals
- Overrides:
equals
in classWrappedANN
-
error
-
hashCode
public int hashCode()- Overrides:
hashCode
in classWrappedANN
-
lasso
L1 lasso regularisation -
newOutputBatch
- Overrides:
newOutputBatch
in classWrappedANN
- See Also:
-
rate
-
ridge
L2 ridge regularisation -
structure
- Overrides:
structure
in classWrappedANN
-
toString
-
train
The arguments are typed asAccess1D
but it's probably best to think of (create) them as something 2D where the number of rows should match the batch size and the number of columns the number of inputs and outputs respectively. When the batch size is 1 then the arguments can actually be 1D.- Parameters:
givenInput
- One or more input examples, depending on the batch sizetargetOutput
- One or more, matching, output targets
-
train
@Deprecated public void train(Iterable<? extends Access1D<Double>> givenInputs, Iterable<? extends Access1D<Double>> targetOutputs) Deprecated.Just usetrain(Access1D, Access1D)
insteadNote that the requiredIterable
:s can be obtained from callingAccess2D.rows()
orAccess2D.columns()
on anything "2D". -
weight
-
error
-
NetworkBuilder
andNetworkBuilder.layer(int, Activator)
instead.