Skip to content

Commit 9690d71

Browse files
fix broadcast
1 parent a4ed331 commit 9690d71

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/differentiation/jaches_products.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ function auto_jacvec!(
66
f,
77
x,
88
v,
9-
cache1 = Dual{typeof(ForwardDiff.Tag(DeivVecTag,eltype(x))),eltype(x),1}.(x, ForwardDiff.Partials(reshape(v, size(x)))),
9+
cache1 = Dual{typeof(ForwardDiff.Tag(DeivVecTag,eltype(x))),eltype(x),1}.(x, ForwardDiff.Partials.(reshape(v, size(x)))),
1010
cache2 = similar(cache1),
1111
)
12-
cache1 .= Dual{typeof(ForwardDiff.Tag(DeivVecTag,eltype(x))),eltype(x),1}.(x, ForwardDiff.Partials(reshape(v, size(x))))
12+
cache1 .= Dual{typeof(ForwardDiff.Tag(DeivVecTag,eltype(x))),eltype(x),1}.(x, ForwardDiff.Partials.(reshape(v, size(x))))
1313
f(cache2, cache1)
1414
vecdy = _vec(dy)
1515
vecdy .= partials.(vec(cache2), 1)
@@ -20,7 +20,7 @@ _vec(v::AbstractVector) = v
2020

2121
function auto_jacvec(f, x, v)
2222
vv = reshape(v, axes(x))
23-
vec(partials.(vec(f(ForwardDiff.Dual{typeof(ForwardDiff.Tag(DeivVecTag,eltype(x))),eltype(x),1}.(x, ForwardDiff.Partials(vv)))), 1))
23+
vec(partials.(vec(f(ForwardDiff.Dual{typeof(ForwardDiff.Tag(DeivVecTag,eltype(x))),eltype(x),1}.(x, ForwardDiff.Partials.(vv)))), 1))
2424
end
2525

2626
function num_jacvec!(

0 commit comments

Comments
 (0)