乙状结肠的导数 [英] Derivative of sigmoid
问题描述
我正在使用反向传播技术创建一个用于学习的神经网络.
I'm creating a neural network using the backpropagation technique for learning.
我了解我们需要找到所用激活函数的导数.我正在使用标准的S型函数
I understand we need to find the derivative of the activation function used. I'm using the standard sigmoid function
f(x) = 1 / (1 + e^(-x))
我已经知道它的派生词是
and I've seen that its derivative is
dy/dx = f(x)' = f(x) * (1 - f(x))
这可能是一个愚蠢的问题,但这是否意味着我们必须在方程式中将x通过S型函数传递两次,因此它将扩展为
This may be a daft question, but does this mean that we have to pass x through the sigmoid function twice during the equation, so it would expand to
dy/dx = f(x)' = 1 / (1 + e^(-x)) * (1 - (1 / (1 + e^(-x))))
或者只是获取已经计算出的 f(x)
输出(即神经元的输出),然后将该值替换为 f(x)即可.代码>?
or is it simply a matter of taking the already calculated output of f(x)
, which is the output of the neuron, and replace that value for f(x)
?
推荐答案
这两种方法是等效的(因为数学函数没有副作用,并且对于给定的输出总是返回相同的输入),所以您也许还可以(更快)做第二种方式.
The two ways of doing it are equivalent (since mathematical functions don't have side-effects and always return the same input for a given output), so you might as well do it the (faster) second way.
这篇关于乙状结肠的导数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!