Skip to content

Instantly share code, notes, and snippets.

@enochkan
Created November 6, 2020 17:26
Show Gist options
  • Save enochkan/4193587d614808485be984d49ed5cdf2 to your computer and use it in GitHub Desktop.
Save enochkan/4193587d614808485be984d49ed5cdf2 to your computer and use it in GitHub Desktop.
loss and grad funcs
def loss_function(m):
return m**2-2*m+1
## take derivative
def grad_function(m):
return 2*m-2
def check_convergence(w0, w1):
return (w0 == w1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment