C# 클래스 SharpNeat.Phenomes.NeuralNets.FastCyclicNetwork

A neural network class that represents a network with recurrent (cyclic) connections. This is a much faster implementation of CyclicNetwork. The speedup is approximately 5x depending on hardware and CLR platform, see http://sharpneat.sourceforge.net/network_optimization.html for detailed info. The speedup is achieved by compactly storing all required data in arrays and in a way that maximizes in-order memory accesses; This allows us to maximize use of CPU caches. In contrast the CyclicNetwork class represents the network directly, that is, as a network of neuron/node objects; This has additional overhead such as the standard data associated with each object in dotNet which results in less efficient packing of the true neural net data in memory, which in turns results in less efficient use of CPU memory caches. Finally, representing the network directly as a graph of connected nodes is not conducive to writing code with in-order memory accesses. Algorithm Overview. 1) Loop connections. Each connection gets its input signal from its source neuron, applies its weight and stores its output value./ Connections are ordered by source neuron index, thus all memory accesses here are sequential/in-order. 2) Loop connections (again). Each connection adds its output value to its target neuron, thus each neuron accumulates or 'collects' its input signal in its pre-activation variable. Because connections are sorted by source neuron index and not target index, this loop generates out-of order memory accesses, but is the only loop to do so. 3) Loop neurons. Pass each neuron's pre-activation signal through the activation function and set its post-activation signal value. The activation loop is now complete and we can go back to (1) or stop.
상속: IBlackBox
파일 보기 프로젝트 열기: colgreen/sharpneat 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
_connectionArray SharpNeat.Phenomes.NeuralNets.FastConnection[]
_inputAndBiasNeuronCount int
_neuronActivationFnArray IActivationFunction[]
_neuronAuxArgsArray double[][]
_postActivationArray double[]
_preActivationArray double[]
_timestepsPerActivation int

공개 메소드들

메소드 설명
Activate ( ) : void

Activate the network for a fixed number of iterations defined by the 'maxIterations' parameter at construction time. Activation reads input signals from InputSignalArray and writes output signals to OutputSignalArray.

FastCyclicNetwork ( FastConnection connectionArray, IActivationFunction neuronActivationFnArray, double neuronAuxArgsArray, int neuronCount, int inputNeuronCount, int outputNeuronCount, int timestepsPerActivation ) : SharpNeat.Network

Constructs a FastCyclicNetwork with the provided pre-built FastConnection array and associated data.

ResetState ( ) : void

Reset the network's internal state.

메소드 상세

Activate() 공개 메소드

Activate the network for a fixed number of iterations defined by the 'maxIterations' parameter at construction time. Activation reads input signals from InputSignalArray and writes output signals to OutputSignalArray.
public Activate ( ) : void
리턴 void

FastCyclicNetwork() 공개 메소드

Constructs a FastCyclicNetwork with the provided pre-built FastConnection array and associated data.
public FastCyclicNetwork ( FastConnection connectionArray, IActivationFunction neuronActivationFnArray, double neuronAuxArgsArray, int neuronCount, int inputNeuronCount, int outputNeuronCount, int timestepsPerActivation ) : SharpNeat.Network
connectionArray FastConnection
neuronActivationFnArray IActivationFunction
neuronAuxArgsArray double
neuronCount int
inputNeuronCount int
outputNeuronCount int
timestepsPerActivation int
리턴 SharpNeat.Network

ResetState() 공개 메소드

Reset the network's internal state.
public ResetState ( ) : void
리턴 void

프로퍼티 상세

_connectionArray 보호되어 있는 프로퍼티

protected FastConnection[],SharpNeat.Phenomes.NeuralNets _connectionArray
리턴 SharpNeat.Phenomes.NeuralNets.FastConnection[]

_inputAndBiasNeuronCount 보호되어 있는 프로퍼티

protected int _inputAndBiasNeuronCount
리턴 int

_neuronActivationFnArray 보호되어 있는 프로퍼티

protected IActivationFunction[] _neuronActivationFnArray
리턴 IActivationFunction[]

_neuronAuxArgsArray 보호되어 있는 프로퍼티

protected double[][] _neuronAuxArgsArray
리턴 double[][]

_postActivationArray 보호되어 있는 프로퍼티

protected double[] _postActivationArray
리턴 double[]

_preActivationArray 보호되어 있는 프로퍼티

protected double[] _preActivationArray
리턴 double[]

_timestepsPerActivation 보호되어 있는 프로퍼티

protected int _timestepsPerActivation
리턴 int