Gograd is a small automatic reverse-mode differentiation framework written in Go.
a := NewVar(4)
b := NewVar(3)
c := a.Mul(a.Add(b))
c.Backward()
fmt.Println(c.value)
// prints 28
fmt.Println(a.grad)
// prints 11
fmt.Println(b.grad)
// prints 4
Gograd is a small automatic differentiation framework written in Go.
Gograd is a small automatic reverse-mode differentiation framework written in Go.
a := NewVar(4)
b := NewVar(3)
c := a.Mul(a.Add(b))
c.Backward()
fmt.Println(c.value)
// prints 28
fmt.Println(a.grad)
// prints 11
fmt.Println(b.grad)
// prints 4
Gograd is a small automatic differentiation framework written in Go.
MIT License