C# Class Accord.Neuro.Layer

Exibir arquivo Open project: accord-net/framework

Protected Properties

Property Type Description
inputsCount int
neurons Accord.Neuro.Neuron[]
neuronsCount int
output double[]

Public Methods

Method Description
Compute ( double input ) : double[]

Compute output vector of the layer.

The actual layer's output vector is determined by neurons, which comprise the layer - consists of output values of layer's neurons. The output vector is also stored in Output property.

The method may be called safely from multiple threads to compute layer's output value for the specified input values. However, the value of Output property in multi-threaded environment is not predictable, since it may hold layer's output computed from any of the caller threads. Multi-threaded access to the method is useful in those cases when it is required to improve performance by utilizing several threads and the computation is based on the immediate return value of the method, but not on layer's output property.

Randomize ( ) : void

Randomize neurons of the layer.

Randomizes layer's neurons by calling Neuron.Randomize method of each neuron.

Protected Methods

Method Description
Layer ( int neuronsCount, int inputsCount ) : System

Initializes a new instance of the Layer class.

Protected contructor, which initializes inputsCount, neuronsCount and neurons members.

Method Details

Compute() public method

Compute output vector of the layer.

The actual layer's output vector is determined by neurons, which comprise the layer - consists of output values of layer's neurons. The output vector is also stored in Output property.

The method may be called safely from multiple threads to compute layer's output value for the specified input values. However, the value of Output property in multi-threaded environment is not predictable, since it may hold layer's output computed from any of the caller threads. Multi-threaded access to the method is useful in those cases when it is required to improve performance by utilizing several threads and the computation is based on the immediate return value of the method, but not on layer's output property.

public Compute ( double input ) : double[]
input double Input vector.
return double[]

Layer() protected method

Initializes a new instance of the Layer class.
Protected contructor, which initializes inputsCount, neuronsCount and neurons members.
protected Layer ( int neuronsCount, int inputsCount ) : System
neuronsCount int Layer's neurons count.
inputsCount int Layer's inputs count.
return System

Randomize() public method

Randomize neurons of the layer.
Randomizes layer's neurons by calling Neuron.Randomize method of each neuron.
public Randomize ( ) : void
return void

Property Details

inputsCount protected_oe property

Layer's inputs count.
protected int inputsCount
return int

neurons protected_oe property

Layer's neurons.
protected Neuron[],Accord.Neuro neurons
return Accord.Neuro.Neuron[]

neuronsCount protected_oe property

Layer's neurons count.
protected int neuronsCount
return int

output protected_oe property

Layer's output vector.
protected double[] output
return double[]