Comments (6)
You can set the vjp
in the ODEFunction
constructor, and that would accelerate it. https://docs.sciml.ai/latest/analysis/sensitivity/#Adjoint-Sensitivity-Analysis-via-adjoint_sensitivities-(Backpropogation)-1 + https://docs.sciml.ai/latest/features/performance_overloads/#ODEFunction-1 is the documentation on this (though vjp
is a new option that doesn't seem to be documented yet!).
Jacobian matrix ( df/dx )
Jacobian of the parameters (dF/dp)
You wouldn't want to compute those, you'd want to supply a method for computing the vector-jacobian product directly, which is provided by PyTorch. It would be good to get an example up and running...
from diffeqpy.
I am really a new Julia user, maybe it is a too simple question: in the document https://docs.sciml.ai/latest/analysis/sensitivity/#Adjoint-Sensitivity-Analysis-via-adjoint_sensitivities-(Backpropogation)-1, I have the following bugs
dg(out,u, i) = (out.=1.0.-u)
ts = [0.0,0.2,0.5,0.7]
res = adjoint_sensitivities(sol,Vern9(),dg,ts,abstol=1e-9,reltol=1e-6)
then it seems that the definition of dg has something wrong:
MethodError: no method matching dg(::SubArray{Float64,1,Array{Float64,1},Tuple{UnitRange{Int64}},true}, ::Array{Float64,1}, ::Array{Float64,1}, ::Float64, ::Int64)
Closest candidates are:
dg(::Any, ::Any, ::Any) at In[26]:1
dg(::Any, ::Any) at In[25]:1
from diffeqpy.
There was a docs typo. It should be dg(out,u,p,t,i) = (out.=1.0.-u)
from diffeqpy.
Did you find an adequate solution here? I think we should add it to the docs if you did.
from diffeqpy.
I haven't figure out yet. Calling python functions from Julia seems to be not a robust solution for me. Instead, I plan to re-implement the physical model using Julia, that will make life easier.
from diffeqpy.
Yeah, that's probably the easier route for now. Let me know if you need any help: I think I recall you're in the chatrooms so see you there.
from diffeqpy.
Related Issues (20)
- question: is this repository still under maintain? HOT 3
- Sparse Matrix Jacobian / Mass Matrix support HOT 2
- MethodError: no method matching Sundials.NVector(::Vector{Real}) HOT 3
- Terminating integration based on maxiters results in RuntimeError HOT 3
- problems with julia 1.9? HOT 2
- Speed up julia loading and time to first run HOT 1
- Feature request: Ingest sympy representation of ModelingToolkit and return PyTorch tensor with gradients and events
- dictionary support for de.jit HOT 7
- Support prob_func in ensembles HOT 5
- diffeqpy GPU isn't automatically installing DiffEqGPU on Collab? HOT 2
- Segfault when using sympy symbols as initial conditions.
- UndefVarError: NonlinearLeastSquaresProblem not defined in SimpleNonlinearSolve package HOT 2
- LoadError: Artifact "OpenSpecFun" was not found by looking in the paths HOT 3
- Precompilation not quite working HOT 2
- Error when importing de HOT 9
- TypeError on DiscreteCallback HOT 2
- Error when running the example code for GPU-acceleration using diffeqpy HOT 10
- DAE with Mass Matrix HOT 7
- Error when import the "de" from the "diffeqpy" HOT 1
- Set tspan to be a array/list instead of range HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from diffeqpy.