Skip to content

Commit

Permalink
update ForwardDiff.Dual signature
Browse files Browse the repository at this point in the history
  • Loading branch information
xukai92 committed Oct 3, 2017
1 parent ffb9407 commit 2a9466d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/ad.jl
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ gradient(vi::VarInfo, model::Function, spl::Union{Void, Sampler}) = begin
vals = getval(vi, vns[i])
if vns[i] in vn_chunk # for each variable to compute gradient in this round
for i = 1:l
vi[range[i]] = ForwardDiff.Dual{CHUNKSIZE, Float64}(realpart(vals[i]), SEEDS[dim_count])
vi[range[i]] = ForwardDiff.Dual{Void, Float64, CHUNKSIZE}(realpart(vals[i]), SEEDS[dim_count])
dim_count += 1 # count
end
else # for other varilables (no gradient in this round)
for i = 1:l
vi[range[i]] = ForwardDiff.Dual{CHUNKSIZE, Float64}(realpart(vals[i]))
vi[range[i]] = ForwardDiff.Dual{Void, Float64, CHUNKSIZE}(realpart(vals[i]))
end
end
end
Expand Down

0 comments on commit 2a9466d

Please sign in to comment.