Previous question · 406
Data Stream as Disjoint Intervals
hardData Structures
Next question · 408
Top Two Media Channels
mediumDatabase
Random coding question

407. Backpropagation through linear layer

easy
GeneralGeneral
senior
Function contract
Inputs
W
np.ndarray
X
np.ndarray
b
np.ndarray
dY
np.ndarray
Returns
value
tuple

Examples

Input
{
  "W": [
    [
      2,
      -1
    ],
    [
      0,
      1
    ],
    [
      -3,
      0.5
    ]
  ],
  "X": [
    [
      1,
      -2,
      0.5
    ],
    [
      0,
      3,
      -1.5
    ]
  ],
  "b": [
    0.1,
    -0.2
  ],
  "dY": [
    [
      1.5,
      -0.5
    ],
    [
      -2,
      2
    ]
  ]
}
Output
[
  [
    [
      3.5,
      -0.5,
      -4.75
    ],
    [
      -6,
      2,
      7
    ]
  ],
  [
    [
      1.5,
      -0.5
    ],
    [
      -9,
      7
    ],
    [
      3.75,
      -3.25
    ]
  ],
  [
    -0.5,
    1.5
  ]
]

Constraints

Hint 1
Hint 2
Roles
ML Engineer
AI Engineer
Data Scientist
Research Scientist
Companies
GeneralGeneral
Levels
senior
entry
Tags
backpropagation
linear-layer
matrix-calculus
numpy

Similar Questions

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