In
artificial intelligence
Artificial intelligence (AI) is intelligence—perceiving, synthesizing, and inferring information—demonstrated by machines, as opposed to intelligence displayed by animals and humans. Example tasks in which this is done include speech re ...
, especially
computer vision
Computer vision is an interdisciplinary scientific field that deals with how computers can gain high-level understanding from digital images or videos. From the perspective of engineering, it seeks to understand and automate tasks that the hum ...
and
artificial neural network
Artificial neural networks (ANNs), usually simply called neural networks (NNs) or neural nets, are computing systems inspired by the biological neural networks that constitute animal brains.
An ANN is based on a collection of connected unit ...
s, a hard sigmoid is non-
smooth
Smooth may refer to:
Mathematics
* Smooth function, a function that is infinitely differentiable; used in calculus and topology
* Smooth manifold, a differentiable manifold for which all the transition maps are smooth functions
* Smooth algebrai ...
function used in place of a
sigmoid function
A sigmoid function is a mathematical function having a characteristic "S"-shaped curve or sigmoid curve.
A common example of a sigmoid function is the logistic function shown in the first figure and defined by the formula:
:S(x) = \frac = \f ...
. These retain the basic shape of a sigmoid, rising from 0 to 1, but using simpler functions, especially
piecewise linear functions or
piecewise constant function
In mathematics, a function on the real numbers is called a step function if it can be written as a finite linear combination of indicator functions of intervals. Informally speaking, a step function is a piecewise constant function having only ...
s. These are preferred where speed of computation is more important than precision.
Examples
The most extreme examples are the
sign function
In mathematics, the sign function or signum function (from '' signum'', Latin for "sign") is an odd mathematical function that extracts the sign of a real number. In mathematical expressions the sign function is often represented as . To avoi ...
or
Heaviside step function
The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function, named after Oliver Heaviside (1850–1925), the value of which is zero for negative arguments and one for positive argume ...
, which go from −1 to 1 or 0 to 1 (which to use depends on normalization) at 0.
Other examples include the
Theano
In Greek mythology, Theano (; Ancient Greek: Θεανώ) may refer to the following personages:
*Theano, wife of Metapontus, king of Icaria. Metapontus demanded that she bear him children, or leave the kingdom. She presented the children of Melan ...
library, which provides two approximations:
ultra_fast_sigmoid
, which is a multi-part piecewise approximation and
hard_sigmoid
, which is a 3-part piecewise linear approximation (output 0, line with slope 0.2, output 1).
Theano/sigm.py at 38a6331ae23250338290e886a72daadb33441bc4 · Theano/Theano · GitHub
/ref>
References
{{reflist
Artificial neural networks