dlode45
Deep learning solution of nonstiff ordinary differential equation (ODE)
Since R2021b
Syntax
Description
The neural ordinary differential equation (ODE) operation returns the solution of a specified ODE.
The dlode45
function applies the neural ODE operation to dlarray
data.
Using dlarray
objects makes working with high
dimensional data easier by allowing you to label the dimensions. For example, you can label
which dimensions correspond to spatial, time, channel, and batch dimensions using the
"S"
, "T"
, "C"
, and
"B"
labels, respectively. For unspecified and other dimensions, use the
"U"
label. For dlarray
object functions that operate
over particular dimensions, you can specify the dimension labels by formatting the
dlarray
object directly, or by using the DataFormat
option.
Note
The dlode45
function best suits neural ODE and custom training loop
workflows. To solve ODEs for other workflows, use ode45
.
specifies additional options using one or more name-value arguments. For example, Y
= dlode45(___,Name=Value
)Y
= dlode45(odefun,tspan,Y0,theta,GradientMode="adjoint")
integrates the system of
ODEs given by odefun
and computes gradients by solving the associated
adjoint ODE system.
Examples
Input Arguments
Output Arguments
Algorithms
The neural ordinary differential equation (ODE) operation returns the solution of a specified ODE. In particular, given an input, a neural ODE operation outputs the numerical solution of the ODE for the time horizon (t0,t1) and with the initial condition y(t0) = y0, where t and y denote the ODE function inputs and θ is a set of learnable parameters. Typically, the initial condition y0 is either the network input or the output of another deep learning operation.
The dlode45
function uses the ode45
function, which is based on an explicit Runge-Kutta (4,5) formula, the
Dormand-Prince pair. It is a single-step solver–in computing
y(tn), it needs only the solution at the
immediately preceding time point, y(tn-1)
[2]
[3].
References
[1] Chen, Ricky T. Q., Yulia Rubanova, Jesse Bettencourt, and David Duvenaud. “Neural Ordinary Differential Equations.” Preprint, submitted June 19, 2018. https://arxiv.org/abs/1806.07366.
[2] Dormand, J. R., and P. J. Prince. “A Family of Embedded Runge-Kutta Formulae.” Journal of Computational and Applied Mathematics 6, no. 1 (March 1980): 19–26. https://doi.org/10.1016/0771-050X(80)90013-3.
[3] Shampine, Lawrence F., and Mark W. Reichelt. “The MATLAB ODE Suite.” SIAM Journal on Scientific Computing 18, no. 1 (January 1997): 1–22. https://doi.org/10.1137/S1064827594276424.