https://github.com/JuliaDiffEq/DiffEqFlux.jl
Raw File
Tip revision: e522ff0e1d5180344a4fbb8d3e304edf51fe4001 authored by Christopher Rackauckas on 11 July 2019, 17:51:13 UTC
Update Project.toml
Tip revision: e522ff0
utils.jl
using Flux, 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)
back to top