https://github.com/JuliaDiffEq/DiffEqFlux.jl
Tip revision: d99ea9519d7d7fad6f4694107fcf209d6bbf8d1d authored by Chris Rackauckas on 28 December 2019, 18:53:05 UTC
fix adjoint return types
fix adjoint return types
Tip revision: d99ea95
utils.jl
using Flux, Tracker, Test
using DiffEqFlux: destructure, restructure
model = Chain(Dense(10, 5, relu), Dense(5, 2))
p = destructure(model)
m2 = restructure(model, p)
@test !Tracker.isleaf(m2[1].W)
x = rand(10)
@test model(x) == m2(x)