Skip to content

Commit d2d7d07

Browse files
committed
fix: work around for JuliaDiff/ChainRulesCore.jl#687
1 parent 40a3130 commit d2d7d07

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ChainRules.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ function (e::EvalPullback)((dY, _))
6666
dconstants_dY = @view dX_constants_dY[(nfeatures + 1):end, :]
6767

6868
dtree = NodeTangent(
69-
e.tree, sum(j -> dconstants_dY[:, j] * dY[j], eachindex(dY, axes(dconstants_dY, 2)))
69+
e.tree, sum(j -> dconstants_dY[:, j] * dY[j], eachindex(axes(dconstants_dY, 2)))
7070
)
7171

72-
dX = dX_dY .* reshape(dY, 1, length(dY))
72+
dX = dX_dY .* reshape(dY, 1, size(dconstants_dY, 2))
7373

7474
return (NoTangent(), dtree, dX, NoTangent())
7575
end

0 commit comments

Comments
 (0)