# Trouble with CPU+GPU adjoints for UDEs

**URL:** <https://discourse.julialang.org/t/trouble-with-cpu-gpu-adjoints-for-udes/115290>\
**Category:** General Usage\
**Tags:** question, optimization, sciml, diffeqflux\
**Created:** [June 6, 2024, 5:36pm UTC](https://discourse.julialang.org/t/trouble-with-cpu-gpu-adjoints-for-udes/115290 "2024-06-06T17:36:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![19fitzna](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/19fitzna/32/209597_2.png) [@19fitzna](https://discourse.julialang.org/u/19fitzna)\
**Post date:** [June 6, 2024, 5:36pm UTC](https://discourse.julialang.org/t/trouble-with-cpu-gpu-adjoints-for-udes/115290/1 "2024-06-06T17:36:49Z")

</div>

Hi all! I am currently trying to create UDEs using a GPU backend for the neural network only. I have been following the examples [here](https://github.com/SciML/DiffEqFlux.jl/issues/401), but have not been able to get anything to work. I was wondering if anyone might know of or be willing to provide an alternative example of this, as I suspect this one might be out of date. Thank you!

---

<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 6, 2024, 5:49pm UTC](https://discourse.julialang.org/t/trouble-with-cpu-gpu-adjoints-for-udes/115290/2 "2024-06-06T17:49:02Z")

</div>

That code from early 2020 would need some updates. [GPU-based MNIST Neural ODE Classifier · DiffEqFlux.jl](https://docs.sciml.ai/DiffEqFlux/stable/examples/mnist_neural_ode/) might be a better starting point?
