Computes output value of neuron.

Namespace:  AForge.Neuro
Assembly:  AForge.Neuro (in AForge.Neuro.dll) Version: (


public override double Compute(
	double[] input


Type: array< System..::.Double >[]()[]
Input vector.

Return Value

Returns neuron's output value.


The output value of activation neuron is equal to value of nueron's activation function, which parameter is weighted sum of its inputs plus threshold value. The output value is also stored in Output property.

Note:The method may be called safely from multiple threads to compute neuron'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 neuron'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 neuron's output property.


System..::.ArgumentExceptionWrong length of the input vector, which is not equal to the expected value.

See Also