Skip to content

Commit

Permalink
replace adjoints with transposes in logdet and det
Browse files Browse the repository at this point in the history
  • Loading branch information
oxinabox committed Apr 28, 2020
1 parent b4f8f77 commit bebd13e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rulesets/LinearAlgebra/dense.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ end
function rrule(::typeof(det), x::Union{Number, AbstractMatrix})
Ω = det(x)
function det_pullback(ΔΩ)
return NO_FIELDS, Ω * ΔΩ * inv(x)'
return NO_FIELDS, Ω * ΔΩ * transpose(inv(x))
end
return Ω, det_pullback
end
Expand All @@ -67,7 +67,7 @@ end
function rrule(::typeof(logdet), x::Union{Number, AbstractMatrix})
Ω = logdet(x)
function logdet_pullback(ΔΩ)
return (NO_FIELDS, ΔΩ * inv(x)')
return (NO_FIELDS, ΔΩ * transpose(inv(x)))
end
return Ω, logdet_pullback
end
Expand Down

0 comments on commit bebd13e

Please sign in to comment.