view tvii/gradient_descent.py @ 93:36c141f0f0bd default tip

add tensorflow dependency + console scripts
author Jeff Hammel <k0scist@gmail.com>
date Sun, 17 Dec 2017 14:31:35 -0800
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 - ....