# Training Neural ODEs - Advice

**URL:** <https://discourse.julialang.org/t/training-neural-odes-advice/130141>\
**Category:** Machine Learning\
**Tags:** diffeqflux, lux\
**Created:** [June 23, 2025, 8:20pm UTC](https://discourse.julialang.org/t/training-neural-odes-advice/130141 "2025-06-23T20:20:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![julianewbsourcream](https://avatars.discourse-cdn.com/v4/letter/j/7ea924/32.png) [@julianewbsourcream](https://discourse.julialang.org/u/julianewbsourcream)\
**Post date:** [June 23, 2025, 8:20pm UTC](https://discourse.julialang.org/t/training-neural-odes-advice/130141/1 "2025-06-23T20:20:30Z")

</div>

Hi,  
I am looking for some advice about training neural ODE models. I am looking to train a neural ODE model on a sample of ~25000, 10x4000 matrices. The columns represent time so I was looking to at use an increasing amount of columns/data, like the weather forecasting example from the DiffEqFlux [documentation](https://docs.sciml.ai/DiffEqFlux/stable/examples/neural_ode_weather_forecast/) and minibatches.

I am using Julia v1.11.5, Lux and DiffEqFlux to define and train the models. I have access to 20 cores on an Intel i7-1370P or an intel Iris Xe GPU.

My questions are:

- Given my hardware limitations, would the CPU or GPU be a better option for training the model?
  - Given the GPU, would a compiled Lux model for CPU be the best bet?

- Can Lux use Julia threads to access multiple CPU cores?
  - I was thinking of an OpenMP type scenario: multiple threads and shared memory.

- As a model training strategy, does multiple shooting use fewer computational resources than increasing the amount of data?

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:** [June 24, 2025, 10:10am UTC](https://discourse.julialang.org/t/training-neural-odes-advice/130141/2 "2025-06-24T10:10:36Z")

</div>

> [@julianewbsourcream](#):
>
> Given my hardware limitations, would the CPU or GPU be a better option for training the model?

Purely neural ODE, depends on NN size but likely GPU is faster if your hidden layers are at least about 256.

> [@julianewbsourcream](#):
>
> Can Lux use Julia threads to access multiple CPU cores?
> 
> - I was thinking of an OpenMP type scenario: multiple threads and shared memory.

No need, BLAS already will multi thread this by default.

> [@julianewbsourcream](#):
>
> As a model training strategy, does multiple shooting use fewer computational resources than increasing the amount of data

The reason for multiple shooting is not efficiency but numerical stability

---

<div class="post-metadata">

**Author:** ![julianewbsourcream](https://avatars.discourse-cdn.com/v4/letter/j/7ea924/32.png) [@julianewbsourcream](https://discourse.julialang.org/u/julianewbsourcream)\
**Post date:** [June 24, 2025, 1:49pm UTC](https://discourse.julialang.org/t/training-neural-odes-advice/130141/3 "2025-06-24T13:49:26Z")

</div>

@ChrisRackauckas - thank you for the response. I appreciate you sharing your knowledge 😀.
