view tvii/gradient_descent.py @ 87:9d5a5e9f5c3b

add kmeans + dataset
author Jeff Hammel <k0scist@gmail.com>
date Sun, 17 Dec 2017 14:05:57 -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 - ....