Skip to content

Commit

Permalink
next attempt at proper fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Jutho committed Nov 17, 2023
1 parent 21e8f6f commit b7de300
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/TensorKitChainRulesCoreExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ function ChainRulesCore.rrule(::typeof(TensorKit.tsvd!), t::AbstractTensorMap;
Uc, Σc, Vc = block(U, c), block(Σ, c), block(V, c)
ΔUc, ΔΣc, ΔVc = block(ΔU, c), block(ΔΣ, c), block(ΔV, c)
Σdc = view(Σc, diagind(Σc))
ΔΣdc = (ΔΣdc isa AbstractZero) ? ΔΣdc : view(ΔΣdc, diagind(ΔΣdc))
ΔΣdc = (ΔΣc isa AbstractZero) ? ΔΣc : view(ΔΣc, diagind(ΔΣc))
copyto!(b, svd_pullback(Uc, Σdc, Vc, ΔUc, ΔΣdc, ΔVc))
end
return NoTangent(), Δt
Expand Down

0 comments on commit b7de300

Please sign in to comment.