Advertisement
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)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement