How a neural network gets its gradients: forward pass, then backward pass.
Mathematica
Visit on X@mathemetica83K followers
14,537 views
How a neural network gets its gradients: forward pass, then backward pass.
Forward: the inputs flow through the graph and every intermediate value is stored.
Backward: start from the output with gradient 1. Each node multiplies the incoming gradient by its own local derivative and passes it back to its inputs.
For a chain z = f(h(x)), that is just ∂z/∂x = ∂z/∂h · ∂h/∂x.
Comments
Comments from the original post on X (Twitter)
No comments yet
