Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Julia Flux issue: UndefVarError: Tracker not defined

I'm trying to run the sample code in https://github.com/JuliaDiffEq/NeuralNetDiffEq.jl/blob/master/test/NNODE_tests.jl (first example on scalars) but am getting a UndefVarError: Tracker not defined error. I tried using Flux.Tracker and using Tracker but couldn't get it fixed. Has Tracker been deprecated? Or is it some compatibility issue? I'm using Flux v0.10.1 and Tracker 0.2.6. Thanks!

like image 441
ccl Avatar asked Dec 04 '25 15:12

ccl


1 Answers

I've found 2 solutions to this problem:

  1. Downgrade to Flux v0.9 (which has Flux.Tracker) using Pkg.add(Pkg.PackageSpec(;name="Flux", version="0.9.0"))
  2. Edit the NeuralNetDiffEq ODE solver jl files:

For solution 2, first use using Pkg; Pkg.add("Tracker"). Then do import NeuralNetDiffEq; path(NeuralNetDiffEq) to find the package path. Open ode_solver.jl (or whichever solver you are using), and then add using Tracker at the top of the file.

(Note as of Jan 16 2019, NeuralNetDiffEq doesn't completely work with Flux 0.10!)

Hope this will be useful to someone!

like image 63
ccl Avatar answered Dec 07 '25 22:12

ccl



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!