Apply the Sigmoid Function
Learn how to use the sigmoid function to calculate the outputs of the hidden and final layers.
We'll cover the following
Sigmoid function in scipy
Here’s the formula of the sigmoid function:
This should be easy, especially if the sigmoid function is already defined in a Python library. It turns out that it is. The scipy
library has a set of special functions, and the sigmoid function is called expit()
. This library is imported, just like we imported the numpy
library:
Get hands-on with 1400+ tech skills courses.