Previous question · 422
01 Matrix
mediumData Structures
Next question · 424
Valid Perfect Square
easyMath
Random coding question

423. Truncated BPTT

hard
GeneralGeneral
manager
Function contract
Inputs
k
int
bh
np.ndarray
by
np.ndarray
h0
np.ndarray
lr
float
xs
np.ndarray
ys
np.ndarray
Whh
np.ndarray
Why
np.ndarray
Wxh
np.ndarray
Returns
value
tuple

Examples

Input
{
  "k": 2,
  "bh": [
    0,
    0
  ],
  "by": [
    0,
    0
  ],
  "h0": [
    0,
    0
  ],
  "lr": 0.1,
  "xs": [
    [
      1,
      0
    ],
    [
      0,
      1
    ],
    [
      1,
      1
    ]
  ],
  "ys": [
    0,
    1,
    0
  ],
  "Whh": [
    [
      0.05,
      0
    ],
    [
      0,
      0.05
    ]
  ],
  "Why": [
    [
      0.2,
      -0.1
    ],
    [
      -0.2,
      0.1
    ]
  ],
  "Wxh": [
    [
      0.1,
      -0.2
    ],
    [
      0,
      0.3
    ]
  ]
}
Output
[
  [
    [
      0.11310392696611374,
      -0.19872074907006979
    ],
    [
      -0.006306776161592767,
      0.2995167118915112
    ]
  ],
  [
    [
      0.048101815873916834,
      0.0020191914461864654
    ],
    [
      0.0008817984185397935,
      0.04907301410620861
    ]
  ],
  [
    [
      0.20270596503057403,
      -0.09918561326988112
    ],
    [
      -0.20270596503057403,
      0.09918561326988112
    ]
  ],
  [
    0.007451821820542735,
    -0.003607964168097727
  ],
  [
    0.018331047319479113,
    -0.018331047319479113
  ],
  0.6826697208792609,
  [
    -0.10919197680443109,
    0.3045849044628694
  ]
]

Constraints

Hint 1
Hint 2
Hint 3
Roles
ML Engineer
AI Engineer
Data Scientist
Research Scientist
Companies
GeneralGeneral
Levels
manager
staff
senior
Tags
RNN
truncated-BPTT
backpropagation
softmax-cross-entropy

Similar Questions

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