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
파일 보기 프로젝트 열기: holisticware-admin/MonoVersal.AForgeNET 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
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