Skip to content

Commit

Permalink
Add workaround for <FluxML/Zygote.jl#962>
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoq committed Jun 9, 2021
1 parent 24bc905 commit 5771aa3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/NeuralSurrogate.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
using Flux
using Flux: @epochs

### NOTICE: the next thee lines are a workaround for <https://github.com/FluxML/Zygote.jl/pull/962>
using Base
using Zygote
Base.setindex!(dict::IdDict, dx::Zygote.OneElement, x) = dict[x] = collect(dx)

mutable struct NeuralSurrogate{X,Y,M,L,O,P,N,A,U} <: AbstractSurrogate
x::X
y::Y
Expand Down

0 comments on commit 5771aa3

Please sign in to comment.