Activation functions

Let's see the activation function first. I want to give you an idea at what stage of ANN we will use this activation function. In our discussion of the perceptron, we said that neural networks will generate an output of one if it exceeds a certain threshold; otherwise, the output will be zero. This whole mechanism to calculate the threshold and generate the output based on this threshold is taken care by the activation function.

Activation functions are able to provide us with values that lie between 0 and 1. After this, using our threshold value, we can generate output value 1 or output value 0. Suppose our threshold value is 0.777 and our activation function output is 0.457, then our resultant output will be 0; if our ...

Get Python Natural Language Processing now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.