Skip to content

Commit

Permalink
use IdDict in grad_mut fallback for IdDict
Browse files Browse the repository at this point in the history
Fixes hashing issues with CuArrays
  • Loading branch information
ChrisRackauckas committed Jan 20, 2020
1 parent 257a26e commit d47a712
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 @@ -24,6 +24,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 d47a712

Please sign in to comment.