1

Softmax Activation

Unsolved
Fundamentals

Difficulty: 2 | Problem written by peter.washington

Educational Resource: https://cs231n.github.io/neural-networks-1/


Problem reported in interviews at

Amazon
Apple
Facebook
Google
Netflix

Given an input vector X represented as a 1D Numpy array, return the result of applying softmax activation to the vector. The result should be another 1D Numpy array.

Sample Input:
<class 'list'>
X: [-100 100 300]

Expected Output:
<class 'numpy.ndarray'>
[1.91516960e-174 1.38389653e-087 1.00000000e+000]

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.

Sapiente sed minima quia esse dolor id ipsa, omnis veritatis fuga iste ducimus culpa sint fugit, cumque quidem laudantium eum fugiat ducimus sapiente error recusandae dolorem accusantium illo, animi nisi error fuga facere?

Sunt doloremque illo omnis delectus nisi, in ducimus officiis, officiis ullam obcaecati sit aperiam veniam, vitae non aliquid reiciendis ducimus.

Eveniet voluptatibus odio quae consequuntur error illo alias consequatur beatae sit quis.

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)