view tvii/gradient_descent.py @ 48:2a3cb44802a7

[doc] illustration of fwd+back propagation
author Jeff Hammel <k0scist@gmail.com>
date Sun, 17 Sep 2017 14:19:18 -0700
parents 857a606783e1
children
line wrap: on
line source

"""
gradient descent for neural networks
"""

# Each loop:
# - computes predictions
# - compute derivatives: dw, db
# update: w = w - alpha * dw; b = b - ....