Adjoint and Optimization in Julia

Adjoint and Optimization in Julia#

See ECCO.jl docs for more information and examples.

using Pkg; Pkg.add(url="https://github.com/gaelforget/ECCO.jl")
using ECCO
(f,f_ad,x,y)=ECCO.toy_problems.enzyme_ex4()
fc=f(x,y)
adx=f_ad(x,y)
(fc=fc,adx=adx)
(fc = -3.0606099804357885, adx = [0.0, 917.7850566361462, -6.121219960871577, -0.44841281435892])
(f,g!,x0,x1,result)=ECCO.toy_problems.optim_ex2()
dx=1e-4*(x0-x1)
(fc=f(x1),gradient_check=f(x1)<f(x1+dx))
(fc = 5.191703158437428e-27, gradient_check = true)