Skip to content

A toy forward-mode autodiff utility written in Python

Notifications You must be signed in to change notification settings

domcorvasce/toygrad

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

toygrad

A toy forward-mode autodiff utility written in Python.

Usage

from toygrad import gradient

# Compute the partial derivative ∂/∂x = 2x / y^2 of `func`
# and evaluate the derivative at x = 2 and y = 3.
func = lambda x, y: (x ** 2) / (y ** 2)
print(gradient(of=func, wrt="x", at=[2, 3]))

Releases

No releases published

Packages

No packages published