org.encog.neural.flat.train.gradient
Class GradientWorkerCPU
java.lang.Object
org.encog.neural.flat.train.gradient.GradientWorkerCPU
- All Implemented Interfaces:
- FlatGradientWorker, EngineTask
public class GradientWorkerCPU
- extends Object
- implements FlatGradientWorker
Worker class for the mulithreaded training of flat networks.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GradientWorkerCPU
public GradientWorkerCPU(FlatNetwork theNetwork,
TrainFlatNetworkProp theOwner,
MLDataSet theTraining,
int theLow,
int theHigh)
- Construct a gradient worker.
- Parameters:
theNetwork - The network to train.theOwner - The owner that is doing the training.theTraining - The training data.theLow - The low index to use in the training data.theHigh - The high index to use in the training data.
getNetwork
public final FlatNetwork getNetwork()
-
- Specified by:
getNetwork in interface FlatGradientWorker
- Returns:
- The network being trained by this thread.
getWeights
public final double[] getWeights()
- Specified by:
getWeights in interface FlatGradientWorker
- Returns:
- The weights for this network.
run
public final void run()
- Perform the gradient calculation for the specified index range.
- Specified by:
run in interface EngineTask
Copyright © 2011. All Rights Reserved.