comparison docs/matrix.txt @ 44:857a606783e1

[documentation] notes + stubs on gradient descent
author Jeff Hammel <k0scist@gmail.com>
date Mon, 04 Sep 2017 15:06:38 -0700
parents 59044f78d587
children
comparison
equal deleted inserted replaced
43:2f0caec46e26 44:857a606783e1
12 W1 = [---] 12 W1 = [---]
13 [---] 13 [---]
14 14
15 `W1x1` gives some column vector, where `x1` 15 `W1x1` gives some column vector, where `x1`
16 is the first training example. 16 is the first training example.
17
18 Y = [ y1 y2 ... ym]
19
20 For a two-layer network:
21
22 dZ2 = A2 - Y
23
24 dW = (1/m) dZ2 A1'
25
26 db2 = (1./m)*np.sum(dZ2, axis=1, keepdims=True)
27
28 dZ1 = W2' dZ2 * g1 ( Z1 )
29 : W2' dZ2 : an (n1, m) matrix
30 : * : element-wise product
31
32 dW1 = (1/m) dZ1 X'
33
34 db1 = (1/m) np.sum(dZ1, axis=1, keepdims=True)