First derivative of the sigmoid activation function.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rk), | intent(in) | :: | x(:) |
pure function sigmoid_prime(x) result(res)
!! First derivative of the sigmoid activation function.
real(rk), intent(in) :: x(:)
real(rk) :: res(size(x))
res = sigmoid(x) * (1 - sigmoid(x))
end function sigmoid_prime