C# Класс AForge.Neuro.ActivationNeuron

Activation neuron.

Activation neuron computes weighted sum of its inputs, adds threshold value and then applies activation function. The neuron isusually used in multi-layer neural networks.

Наследование: Neuron
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
function IActivationFunction
threshold double

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

Метод Описание
ActivationNeuron ( int inputs, IActivationFunction function ) : System

Initializes a new instance of the ActivationNeuron class.

Compute ( double input ) : double

Computes output value of neuron.

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.

The method may be called safely from multiple threads to compute neuron's output value for the specified input values. However, the value of Neuron.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.

Randomize ( ) : void

Randomize neuron.

Calls base class Randomize method to randomize neuron's weights and then randomizes threshold's value.

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

ActivationNeuron() публичный метод

Initializes a new instance of the ActivationNeuron class.
public ActivationNeuron ( int inputs, IActivationFunction function ) : System
inputs int Neuron's inputs count.
function IActivationFunction Neuron's activation function.
Результат System

Compute() публичный метод

Computes output value of neuron.

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.

The method may be called safely from multiple threads to compute neuron's output value for the specified input values. However, the value of Neuron.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.

Wrong length of the input vector, which is not /// equal to the expected value.
public Compute ( double input ) : double
input double Input vector.
Результат double

Randomize() публичный метод

Randomize neuron.
Calls base class Randomize method to randomize neuron's weights and then randomizes threshold's value.
public Randomize ( ) : void
Результат void

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

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

Activation function.
The function is applied to inputs weighted sum plus threshold value.
protected IActivationFunction function
Результат IActivationFunction

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

Threshold value.
The value is added to inputs weighted sum before it is passed to activation function.
protected double threshold
Результат double