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 TrainingConfigurationprivate final PhysicalStore<Double>[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionactivator(int layer, ArtificialNeuralNetwork.Activator activator) Deprecated.activators(ArtificialNeuralNetwork.Activator activator) Deprecated.UseNetworkBuilderandNetworkBuilder.layer(int, Activator)instead.activators(ArtificialNeuralNetwork.Activator... activators) Deprecated.UseNetworkBuilderandNetworkBuilder.layer(int, Activator)instead.bias(int layer, int output, double bias) dropouts()boolean(package private) doubleinthashCode()lasso(double factor) L1 lasso regularisationrate(double rate) ridge(double factor) L2 ridge regularisationtoString()voidtrain(Iterable<? extends Access1D<Double>> givenInputs, Iterable<? extends Access1D<Double>> targetOutputs) Deprecated.Just usetrain(Access1D, Access1D)insteadvoidThe arguments are typed asAccess1Dbut 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 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.UseNetworkBuilderandNetworkBuilder.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.UseNetworkBuilderandNetworkBuilder.layer(int, Activator)instead. -
activators
Deprecated.UseNetworkBuilderandNetworkBuilder.layer(int, Activator)instead. -
bias
-
dropouts
-
equals
- Overrides:
equalsin classWrappedANN
-
error
-
hashCode
public int hashCode()- Overrides:
hashCodein classWrappedANN
-
lasso
L1 lasso regularisation -
newOutputBatch
- Overrides:
newOutputBatchin classWrappedANN- See Also:
-
rate
-
ridge
L2 ridge regularisation -
structure
- Overrides:
structurein classWrappedANN
-
toString
-
train
The arguments are typed asAccess1Dbut 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
-
NetworkBuilderandNetworkBuilder.layer(int, Activator)instead.