1

Multi-Layer Perceptron Prediction

Unsolved
Neural Networks

Difficulty: 2 | Problem written by peter.washington
Problem reported in interviews at

Amazon
Apple
Facebook
Google
Netflix

Given the multi-layer perceptron neural network in the image, calculate the output for any input vector of size 3. ReLU activation should be applied to both hidden nodes, and sigmoid activation should be applied to the output value.

Click the "View Image" button to view the image.

Sample Input:
<class 'list'>
x: [0, 1, 2]

Expected Output:
<class 'float'>
0.9999999999999982

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.

Dolor ipsa praesentium, assumenda iure cum asperiores nisi quos atque perferendis incidunt tempore hic sequi?

Consectetur perferendis quae laborum a mollitia voluptas?

Impedit libero unde quo accusamus deleniti quia ducimus quos aspernatur voluptatum commodi? Totam dolore odio incidunt veritatis tempora quis recusandae aliquam fuga veniam, minus cumque suscipit, assumenda accusamus architecto quibusdam quaerat reiciendis adipisci alias sequi enim praesentium? Tempore incidunt aspernatur quisquam eos voluptatem aliquam, eveniet officiis dolore fugiat aut exercitationem officia magni, blanditiis placeat nemo vero error est obcaecati ratione harum odio eos maiores, tempora id blanditiis saepe delectus incidunt dolorum voluptatem doloremque quisquam?

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)