Closed Antomek closed 3 years ago
dudt2 = Chain(x -> x.^3,
Dense(2,50,tanh),
Dense(50,2))
p,re = Flux.destructure(dudt2)
dudt(u,p,t) = re(p)(u)
prob = ODEProblem(dudt,u0,tspan)
solves it.
That looks like a copy paste from https://diffeqflux.sciml.ai/dev/examples/neural_ode_flux/ ? Is there anything in the tutorial that needs a fix?
The example code given in Using Flux Chain neural networks with Flux.train! is not working. The parameter vector
p
is not defined. The error:The fix must be an easy one but because I am trying to get the hang of
DiffEqFlux
I'm not spotting it! Thanks for the help.