This page (revision-1) was last changed on 29-Nov-2024 16:16 by UnknownAuthor

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note

Page References

Incoming links Outgoing links

Version management

Difference between version and

At line 1 added 85 lines
!!! Overview
[{$pagename}] of an [Artificial Neuron] defines the output of that [Artificial Neuron] given an input or set of inputs.
[{$pagename}] is just a decision making function that determines presence of a particular feature. Zero means the [Artificial Neuron] says feature is __not__ present and one means [Artificial Neuron] says feature is present.
A standard computer chip circuit can be seen as a digital network of [{$pagename}]s that can be "ON" (1) or "OFF" (0), depending on input.
This is similar to the behavior of the linear [perceptron] in neural networks.
!! nonlinear [{$pagename}]s
Nonlinear [{$pagename}]s allow such networks to compute nontrivial problems using only a small number of nodes. In [Artificial Neural networks] this function may be referred to as the transfer function.
In biologically inspired neural networks, the activation function is usually an abstraction representing the rate of action potential firing in the cell. In its simplest form, this function is [binary]—that is, either the [neuron] is firing or not. The function looks like
%%prettify
{{{
(v_{i})=U(v_{i})
}}}
/%
where U is the Heaviside step function. In this case many [neurons] must be used in computation beyond linear separation of categories.
A line of positive slope may be used to reflect the increase in firing rate that occurs as input current increases. Such a function would be of the form {\displaystyle \phi (v_{i})=\mu v_{i}} \phi (v_{i})=\mu v_{i}, where {\displaystyle \mu } \mu is the slope. This activation function is linear, and therefore has the same problems as the binary function. In addition, networks constructed using this model have unstable convergence because neuron inputs along favored paths tend to increase without bound, as this function is not normalizable.
All problems mentioned above can be handled by using a normalizable [sigmoid activation function|sigmoid function]. One realistic model stays at zero until input current is received, at which point the firing frequency increases quickly at first, but gradually approaches an asymptote at 100% firing rate. Mathematically, this looks like
%%prettify
{{{
(v_{i})=U(v_{i})\tanh(v_{i})
}}}
/%
where the hyperbolic tangent function can be replaced by any [sigmoid function]. This behavior is realistically reflected in the [neuron], as [neurons] cannot physically fire faster than a certain rate. This model runs into problems, however, in computational networks as it is not differentiable, a requirement to calculate [backpropagation].
The final model, then, that is used in multilayer [perceptrons] is a sigmoidal activation function in the form of a hyperbolic tangent. Two forms of this function are commonly used:
%%prettify
{{{
(v_{i})=\tanh(v_{i})
}}}
/%
whose range is normalized from -1 to 1, and
%%prettify
{{{
(v_{i})=(1+\exp(-v_{i}))^{-1}
}}}
/%
is vertically translated to normalize from 0 to 1. The latter model is often considered more biologically realistic, but it runs into theoretical and experimental difficulties with certain types of computational problems.
Typically before [{$pagename}] you would perform [forward propagation]
!! [Artificial Neural networks]
"G" is often used to represent the [{$pagename}].
[{$pagename}] are applied to the [Hidden layers] and to the [Output layer].
! [Sigmoid function] [{$pagename}] in [Python]
Here we show common [Sigmoid|Sigmoid function] [{$pagename}]
%%prettify
{{{
A = sigmoid(np.dot(w.T,X)+b)
}}}
/%
General advise is to __only__ use in a [binary] [output layer] ! Hyperbolic tangent:
%%prettify
{{{
tanh x=-i\tan(ix)
or
a = tanh(z) = (e^z - e^-z) / (e^z) + (e^-z)
}}}
/%
Values will always be between +1 and -1.
! [Rectified Linear Unit] (ReLU)
Instead of [sigmoid function], most recent [Deep Learning] networks use [Rectified Linear Unit]s ([ReLUs]) for the [Hidden layers]. A [Rectified Linear Unit] has output
* 0 if the input is less than 0
* raw output otherwise.
That is, if the input is greater than 0, the output is equal to the input. ReLUs' machinery is more like a real neuron in your body.
[Rectified Linear Unit] [{$pagename}]a are the simplest non-linear [{$pagename}] you can use, obviously. When you get the input is positive, the derivative is just 1, so there isn't the squeezing effect you meet on [backpropagation] errors from the [Sigmoid function].
Research has shown that [Rectified Linear Unit]s result in much faster training for large networks. Most frameworks like [TensorFlow] and [TFLearn] make it simple to use [Rectified Linear Unit]s on the the [Hidden layers], so typically you won't need to implement them yourself.
!! Category
%%category [Artificial Intelligence]%%
!! More Information
There might be more information for this subject on one of the following:
[{ReferringPagesPlugin before='*' after='\n' }]
----
* [#1] - [Activation_function|Wikipedia:Activation_function|target='_blank'] - based on information obtained 2017-11-24-