org.encog.neural.networks.training.propagation

## Class GradientWorker

- java.lang.Object
- - org.encog.neural.networks.training.propagation.GradientWorker

- All Implemented Interfaces:
    EngineTask

      public class GradientWorker
      extends Object
      implements EngineTask

  Worker class for the mulithreaded training of flat networks.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `GradientWorker(FlatNetwork theNetwork, Propagation theOwner, MLDataSet theTraining, int theLow, int theHigh, double[] flatSpot, ErrorFunction ef)` Construct a gradient worker.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ErrorCalculation` | `getErrorCalculation()`
    `FlatNetwork` | `getNetwork()`
    `double[]` | `getWeights()`
    `void` | `run()` Perform the gradient calculation for the specified index range.
    `void` | `run(int index)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### GradientWorker

          public GradientWorker(FlatNetwork theNetwork,
                        Propagation theOwner,
                        MLDataSet theTraining,
                        int theLow,
                        int theHigh,
                        double[] flatSpot,
                        ErrorFunction ef)

      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.

  - ### Method Detail

    - #### getNetwork

          public FlatNetwork getNetwork()

      Returns:
        The network being processed.

    - #### getWeights

          public double[] getWeights()

      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`

    - #### run

          public final void run(int index)

    - #### getErrorCalculation

          public ErrorCalculation getErrorCalculation()

Copyright © 2014. All Rights Reserved.