Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. # Feed forward
  2. out = conv.forward((image / 255) - 0.5)
  3. out = pool.forward(out)
  4. out = softmax.forward(out)
  5.  
  6. # Calculate initial gradient
  7. gradient = np.zeros(10)
  8. # ...
  9.  
  10. # Backprop
  11. gradient = softmax.backprop(gradient)
  12. gradient = pool.backprop(gradient)
  13. gradient = conv.backprop(gradient)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement