2

Derivative of Sigmoid for Backpropagation

Unsolved
Neural Networks

Difficulty: 2 | Problem written by Mr. Umair
Derivatives are used in the process of backpropagation. The optimal set of values are computed by gradient descent, which uses the derivative of the sigmoid function, because that is the activation used by the output neuron in a neural netowkr.

Given an input value to a neuron, find "the ability of neuron to learn" by calculating the derivative of the sigmoid function on that specific input value. 

Note: You can use the math.exp builtin function for calculating the sigmoid value.

Example Input:

Input to Neuron (x) = -2

Example Output:

Derivative of Sigmoid  = 0.1049935854035065

 

Sample Input:
<class 'list'>
x: -2

Expected Output:
<class 'float'>
0.1049935854035065

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Iste id reiciendis accusantium quam, reiciendis autem repellendus quia mollitia quas recusandae voluptatem ipsum dolore exercitationem, labore itaque eos voluptatem doloremque consequatur id doloribus dolores, consectetur eaque iste similique ut hic dicta doloribus voluptates voluptate? Distinctio aliquid vero atque omnis quam voluptate voluptatibus aliquam sed in ipsa, beatae ea aliquam magni tenetur ab, labore perspiciatis corrupti odit ad nam debitis at qui excepturi. Neque saepe doloremque veritatis libero ratione mollitia culpa, nostrum quibusdam reprehenderit aliquam rem fuga accusamus qui illum et quae.

Ipsa obcaecati eum officiis exercitationem aperiam beatae, optio illo magnam voluptatum possimus consectetur commodi id doloremque quaerat aperiam? Qui nisi similique aut, deserunt natus aperiam porro rem sapiente neque vel earum fugiat. Architecto rerum accusantium minus facilis mollitia, accusantium illo asperiores sequi delectus quo magni veniam omnis?

Facilis alias numquam maxime voluptates cupiditate mollitia tenetur id obcaecati aliquid minima, ex ipsa quasi aliquid doloremque esse dolore quaerat non magni ullam, eos ad ratione repudiandae id iusto labore quia a repellat?

This is a premium feature.
To access this and other such features, click on upgrade below.

Ready.

Input Test Case

Please enter only one test case at a time
numpy has been already imported as np (import numpy as np)