Skip to content

Instantly share code, notes, and snippets.

@khannay
Created April 23, 2020 13:48
Show Gist options
  • Save khannay/3be17638be78d91bef1c119b31d0bc29 to your computer and use it in GitHub Desktop.
Save khannay/3be17638be78d91bef1c119b31d0bc29 to your computer and use it in GitHub Desktop.
LotkaVolterra Layer Example
using DifferentialEquations, Flux, Optim, DiffEqFlux, Plots
u0 = [1.0,1.0]
tstart=0.0
tend=10.0
sampling=0.1
model_params= [1.5,1.0,3.0,1.0]
function model(du,u,p,t)
x, y = u
α, β, δ, γ = p
du[1] = dx = α*x - β*x*y
du[2] = dy = -δ*y + γ*x*y
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment