Previous question · 923
Top-Selling Genres
easyDatabase
Next question · 925
Encode and Decode TinyURL
mediumData Structures
Random coding question

924. Multi layer perceptron inference

easy
GeneralGeneral
senior
Function contract
Inputs
x
np.ndarray
W1
np.ndarray
W2
np.ndarray
b1
np.ndarray
b2
np.ndarray
Returns
value
np.ndarray

Examples

Input
{
  "x": [
    1,
    -2
  ],
  "W1": [
    [
      1,
      0.5
    ],
    [
      -1,
      2
    ]
  ],
  "W2": [
    [
      2,
      -1
    ]
  ],
  "b1": [
    0,
    1
  ],
  "b2": [
    0.5
  ]
}
Output
[
  0.5
]

Constraints

Hint 1
Hint 2
Hint 3
Roles
ML Engineer
AI Engineer
Data Scientist
Research Scientist
Companies
GeneralGeneral
Levels
senior
entry
Tags
forward-pass
matrix-vector-multiplication
ReLU
MLP

Similar Questions

Linear Regressionmedium
ML Coding
Activation function relueasy
ML Coding
Text normalizationmedium
ML Coding
50 people are solving this problem
Loading editor for the selected language
Ln 1, Col 1
Program Output
DATAINTERVIEW
Interactive coding terminal
Python / NumPy environment ready.
Type a command below or run code from the editor.
run scriptExecute the current editor contents
submitGrade the current editor contents against all solution test cases
python ("print hello world")Run an isolated Python command
helpShow all available commands