C# Класс Encog.Engine.Network.Train.Prop.TrainFlatNetworkProp

Train a flat network using multithreading, and GPU support. The training data must be indexable, it will be broken into groups for each thread to process. At the end of each iteration the training from each thread is aggregated back to the neural network.
Наследование: ITrainFlatNetwork
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
currentError double
gradients double[]
indexable IEngineIndexableSet
iteration int
lastGradient double[]
network Encog.Engine.Network.Flat.FlatNetwork
numThreads int
reportedException System.Exception
totalError double
training IEngineDataSet
workers IFlatGradientWorker[]

Открытые методы

Метод Описание
CalculateGradients ( ) : void

Calculatee the gradients.

FinishTraining ( ) : void
Iteration ( ) : void
Iteration ( int count ) : void

Perform the specified number of training iterations. This is a basic implementation that just calls iteration the specified number of times. However, some training methods, particularly with the GPU, benefit greatly by calling with higher numbers than 1.

Report ( double gradients, double error, Exception ex ) : void

Called by the worker threads to report the progress at each step.

TrainFlatNetworkProp ( FlatNetwork network, IEngineDataSet training ) : Encog.Engine

Train a flat network multithreaded.

UpdateWeight ( double gradient, double lastGradient, int index ) : double

Update a weight, the means by which weights are updated vary depending on the training.

Защищенные методы

Метод Описание
Learn ( ) : void

Apply and learn.

LearnLimited ( ) : void

Apply and learn. This is the same as learn, but it checks to see if any of the weights are below the limit threshold. In this case, these weights are zeroed out. Having two methods allows the regular learn method, which is what is usually use, to be as fast as possible.

Приватные методы

Метод Описание
CopyContexts ( ) : void

Copy the contexts to keep them consistent with multithreaded training.

Init ( ) : void

Описание методов

CalculateGradients() публичный Метод

Calculatee the gradients.
public CalculateGradients ( ) : void
Результат void

FinishTraining() публичный Метод

public FinishTraining ( ) : void
Результат void

Iteration() публичный Метод

public Iteration ( ) : void
Результат void

Iteration() публичный Метод

Perform the specified number of training iterations. This is a basic implementation that just calls iteration the specified number of times. However, some training methods, particularly with the GPU, benefit greatly by calling with higher numbers than 1.
public Iteration ( int count ) : void
count int The number of training iterations.
Результат void

Learn() защищенный Метод

Apply and learn.
protected Learn ( ) : void
Результат void

LearnLimited() защищенный Метод

Apply and learn. This is the same as learn, but it checks to see if any of the weights are below the limit threshold. In this case, these weights are zeroed out. Having two methods allows the regular learn method, which is what is usually use, to be as fast as possible.
protected LearnLimited ( ) : void
Результат void

Report() публичный Метод

Called by the worker threads to report the progress at each step.
public Report ( double gradients, double error, Exception ex ) : void
gradients double The gradients from that worker.
error double The error for that worker.
ex System.Exception The exception.
Результат void

TrainFlatNetworkProp() публичный Метод

Train a flat network multithreaded.
public TrainFlatNetworkProp ( FlatNetwork network, IEngineDataSet training ) : Encog.Engine
network Encog.Engine.Network.Flat.FlatNetwork The network to train.
training IEngineDataSet The training data to use.
Результат Encog.Engine

UpdateWeight() публичный абстрактный Метод

Update a weight, the means by which weights are updated vary depending on the training.
public abstract UpdateWeight ( double gradient, double lastGradient, int index ) : double
gradient double The gradients.
lastGradient double The last gradients.
index int The index.
Результат double

Описание свойств

currentError защищенное свойство

The current error is the average error over all of the threads.
protected double currentError
Результат double

gradients защищенное свойство

The gradients.
protected double[] gradients
Результат double[]

indexable защищенное свойство

The network in indexable form.
protected IEngineIndexableSet indexable
Результат IEngineIndexableSet

iteration защищенное свойство

The iteration.
protected int iteration
Результат int

lastGradient защищенное свойство

The last gradients, from the last training iteration.
protected double[] lastGradient
Результат double[]

network защищенное свойство

The network to train.
protected FlatNetwork,Encog.Engine.Network.Flat network
Результат Encog.Engine.Network.Flat.FlatNetwork

numThreads защищенное свойство

The number of threads to use.
protected int numThreads
Результат int

reportedException защищенное свойство

Reported exception from the threads.
protected Exception,System reportedException
Результат System.Exception

totalError защищенное свойство

The total error. Used to take the average of.
protected double totalError
Результат double

training защищенное свойство

The training data.
protected IEngineDataSet training
Результат IEngineDataSet

workers защищенное свойство

The workers.
protected IFlatGradientWorker[] workers
Результат IFlatGradientWorker[]