# Problems when replacing Flux by Lux in anodes example

**URL:** <https://discourse.julialang.org/t/problems-when-replacing-flux-by-lux-in-anodes-example/133120>\
**Category:** Machine Learning\
**Tags:** lux\
**Created:** [October 13, 2025, 7:08pm UTC](https://discourse.julialang.org/t/problems-when-replacing-flux-by-lux-in-anodes-example/133120 "2025-10-13T19:08:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jaime\_Araneda](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jaime_araneda/32/20145_2.png) [@Jaime\_Araneda](https://discourse.julialang.org/u/Jaime_Araneda)\
**Post date:** [October 13, 2025, 7:08pm UTC](https://discourse.julialang.org/t/problems-when-replacing-flux-by-lux-in-anodes-example/133120/1 "2025-10-13T19:08:10Z")

</div>

Hello,  
I’m trying to reproduce the anodes example on augmented neural ODEs from the thread [Fitting neural ODE to periodic time series](https://discourse.julialang.org/t/fitting-neural-ode-to-periodic-time-series/42263). However, when replacing Flux by the Lux library (with the corresponding changes) I get: `FromFluxAdaptor` requires `Flux.jl` to be loaded. I don’t have Flux added to Julia, and since I’m just starting to learn neural ODEs, I’m a bit lost here. Does anyone have any suggestions on how to modify the original code to use Lux instead of Flux?  
Thanks!

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [October 24, 2025, 1:19pm UTC](https://discourse.julialang.org/t/problems-when-replacing-flux-by-lux-in-anodes-example/133120/2 "2025-10-24T13:19:21Z")

</div>

You just need to `using Flux` in order to use `FromFluxAdaptor`. Can you share the code you’re running?
