Previous question · 1445
Best Support Agent Rankings
hardDatabase
Next question · 1447
Longest Word in Dictionary
mediumData Structures
Random coding question

1446. RNN forward pass

easy
GeneralGeneral
senior
Function contract
Inputs
X
np.ndarray
b
np.ndarray
Wh
np.ndarray
Wx
np.ndarray
h0
np.ndarray
Returns
value
np.ndarray

Examples

Input
{
  "X": [
    [
      0.5,
      -1,
      2
    ],
    [
      1.5,
      0,
      -0.5
    ]
  ],
  "b": [
    0,
    0.1,
    -0.1
  ],
  "Wh": [
    [
      0.5,
      0,
      -0.1
    ],
    [
      0.2,
      0.6,
      0
    ],
    [
      0,
      -0.3,
      0.7
    ]
  ],
  "Wx": [
    [
      0.2,
      -0.1,
      0
    ],
    [
      0,
      0.3,
      -0.2
    ],
    [
      -0.1,
      0,
      0.4
    ]
  ],
  "h0": [
    0.1,
    -0.2,
    0.3
  ]
}
Output
[
  [
    0.21651806149302885,
    -0.6043677771171634,
    0.7258974148490807
  ],
  [
    0.3236056490007082,
    -0.11875403847504447,
    0.2349653414917418
  ]
]

Constraints

Hint 1
Hint 2
Hint 3
Roles
ML Engineer
AI Engineer
Data Scientist
Research Scientist
Companies
GeneralGeneral
Levels
senior
entry
Tags
vanilla-rnn
forward-pass
numpy-linear-algebra
tanh-activation

Similar Questions

Linear Regressionmedium
ML Coding
Activation function relueasy
ML Coding
Text normalizationmedium
ML Coding
10 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