Skip to content

Commit

Permalink
Merge #474
Browse files Browse the repository at this point in the history
474: use IdDict in grad_mut fallback for IdDict r=CarloLucibello a=ChrisRackauckas

Fixes hashing issues with CuArrays, i.e. FluxML/Flux.jl#989

Co-authored-by: Chris Rackauckas <[email protected]>
  • Loading branch information
bors[bot] and ChrisRackauckas authored Feb 27, 2020
2 parents af498fa + d47a712 commit 200ae53
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lib/base.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ end
# Dictionaries

grad_mut(d::AbstractDict) = Dict()
grad_mut(d::IdDict) = IdDict()

# TODO perhaps look up mutable gradients in `pullback`
function accum(a::AbstractDict, b::AbstractDict)
Expand Down

0 comments on commit 200ae53

Please sign in to comment.