Flux is already a helpful package, thanks for that!
I am currently playing with a Flux script that uses Flux 0.8.3 and everything is running to my satisfaction. Now the current Flux version is 0.10 and uses Zygote under Julia 1.3. This is a clear concept change, but o.k…
To test the effects, I loaded the above script and tried to execute it. I get the following error message:
ERROR: LoadError: Can't differentiate = expression
Stacktrace:
[1] error(::String) at .\error.jl:33
[2] loss at C:\Users\guent\documents\Julia Projekte\Nano Transfer\Flux_Rotwein.jl:83 [inlined]
[3] (::typeof(∂(loss)))(::Float32) at C:\Users\guent\.julia\packages\Zygote\8dVxG\src\compiler\interface2.jl:0
[4] (::Zygote.var"#153#154"{typeof(∂(loss)),Tuple{Tuple{Nothing,Nothing}}})(::Float32) at C:\Users\guent\.julia\packages\Zygote\8dVxG\src\lib\lib.jl:142....
If I’m wrong here, has the documentary been adjusted? I think in the documentary I’ll find examples of how models under “Zgote” need to be adapted, right?
Are you setting a global variable within your model? If so, no problem, we can add support for this in Zygote. I’m sure we can fix something so that your model works here.
As mentioned above, this update is meant to be broadly but not 100% compatible, and if it breaks your code you can (a) tell us and (b) roll back temporarily to make sure you don’t lose work.
We’re aware of the model zoo issues and have updates incoming. If something else is breaking we can help you figure out if it’s a Zygote issue or just something that needs tweaking in your code.
Thank you for your answer! I can’t work on the model at the moment, but I know for sure that I haven’t set a global variable. I use tracked variables as required under 0.8.3. Using Zygote is certainly the right way to avoid duplicate work. It would be ideal, of course, if the Flux user didn’t even notice!
To be fair pytorch and tensorflow and many other frameworks break things all the time. I would suggest you version control your software and setup properly with fixed version numbers on every piece of software you use. This is the only way you can be sure to experience no breakage. Docker is super useful in this respect.
Are there any performance benchmarks now that Zygote is the back-end?
I hadn’t been following it all that closely, but I know that performance has been a major concern with Flux in the past. I had assumed there wouldn’t be a serious focus on performance until Zygote was ready.
(v1.3) pkg> add Metalhead
Resolving package versions…
ERROR: Unsatisfiable requirements detected for package Flux [587475ba]:
Flux [587475ba] log:
├─possible versions are: [0.4.1, 0.5.0-0.5.4, 0.6.0-0.6.10, 0.7.0-0.7.3, 0.8.0-0.8.3, 0.9.0, 0.10.0] or uninstalled
├─restricted to versions 0.10.0 by an explicit requirement, leaving only versions 0.10.0
└─restricted by compatibility requirements with Metalhead [dbeba491] to versions: [0.8.0-0.8.3, 0.9.0] — no versions left
└─Metalhead [dbeba491] log:
├─possible versions are: [0.3.0, 0.4.0] or uninstalled
├─restricted to versions * by an explicit requirement, leaving only versions [0.3.0, 0.4.0]
└─restricted by compatibility requirements with Images [916415d5] to versions: 0.4.0 or uninstalled, leaving only versions: 0.4.0
└─Images [916415d5] log:
├─possible versions are: [0.17.3, 0.18.0, 0.19.0] or uninstalled
└─restricted to versions 0.19.0 by an explicit requirement, leaving only versions 0.19.0
It’s simple to make a PR in the GitHub interface, but I would want to check first, if it would work locally. Is there a simple way to check out overriding the package manager? I couldn’t find how in the docs, no matter how I tried, including what I thought applies:
Sorry for my late reply! I looked at the Flux Docu 0.10, but couldn’t find a clue about “global variables”! I also can’t see what I have to do differently…!
Can you give me a hint?
Thank you for your answer! I have looked at the site intensively, but unfortunately - also no latent - hint found. Maybe I don’t understand the described concept either.
It is not about performance optimization, but about an abort of the function call. Under Flux 0.8.3 everything still runs to my satisfaction and as written, I can’t see what I have to do differently.
In view of the fact that I understand the documentation correctly, I don’t see any changes for my dense model (similar to the Model Zoo’s iris example). If a “global” variable is expected, I would expect the same in the docu. Or for example in the iris model.
I still get the error message described at the beginning!
@MikeInnes, is there anything new on the subject? As written, I looked at the Iris example of the Model Zoo, but couldn’t find any clue. Am I overseeing anything?
Hello,
Thanks the Flux community for the great job about v0.10.
I have a question:
I programed with Flux.jl v0.9: weight = data.(params(model)) to remove tracking. With the v0.10 it’s still work, however a warning appears with REPL:
Warning: `data(x)` is deprecated, use `x` instead.