a guest Jun 18th, 2019 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- # Feed forward
- out = conv.forward((image / 255) - 0.5)
- out = pool.forward(out)
- out = softmax.forward(out)
- # Calculate initial gradient
- gradient = np.zeros(10)
- # ...
- # Backprop
- gradient = softmax.backprop(gradient)
- gradient = pool.backprop(gradient)
- gradient = conv.backprop(gradient)
RAW Paste Data