# LoadError when using interpolations as input for a neural ode

**URL:** <https://discourse.julialang.org/t/loaderror-when-using-interpolations-as-input-for-a-neural-ode/51224>\
**Category:** General Usage\
**Tags:** zygote, interpolations\
**Created:** [December 3, 2020, 9:37pm UTC](https://discourse.julialang.org/t/loaderror-when-using-interpolations-as-input-for-a-neural-ode/51224 "2020-12-03T21:37:33Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![patrick-kidger](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/patrick-kidger/32/20378_2.png) [@patrick-kidger](https://discourse.julialang.org/u/patrick-kidger)\
**Post date:** [June 13, 2021, 12:42pm UTC](https://discourse.julialang.org/t/loaderror-when-using-interpolations-as-input-for-a-neural-ode/51224/6 "2021-06-13T12:42:40Z")

</div>

Caveat emptor:

I do note that there is also `Zygote.dropgrad`. I’m not completely certain of the difference between `dropgrad` and `ignore`, but I found that `dropgrad` gave some other obscure error. Possibly `dropgrad` is the appropriate tool here, but the documentation is pretty sparse. I haven’t tried training the above model more than a few steps to see if it converges.

* * *

As an alternative, you can try implementing the interpolation yourself. (Such that the autodiff works with it.) Linear interpolation is pretty straightforward, after all.

Also have a think about using the `tstops` argument. If you’re using linear interpolation then your vector field has kinks (derivative discontinuities) wrt time, and the solver will have a slightly easier time of it if it doesn’t have to discover these for itelf.

---

_[View the full topic](https://discourse.julialang.org/t/loaderror-when-using-interpolations-as-input-for-a-neural-ode/51224)._
