Skip to content

Commit

Permalink
Merge 3e2d647 into 15add9b
Browse files Browse the repository at this point in the history
  • Loading branch information
willtebbutt committed Aug 17, 2020
2 parents 15add9b + 3e2d647 commit c09d9f1
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 @@ -78,12 +78,12 @@ end
##### `logdet`
#####

function frule((_, Δx), ::typeof(logdet), x::Union{Number, AbstractMatrix})
function frule((_, Δx), ::typeof(logdet), x::Union{Number, StridedMatrix{<:Number}})
Ω = logdet(x)
return Ω, tr(x \ Δx)
end

function rrule(::typeof(logdet), x::Union{Number, AbstractMatrix})
function rrule(::typeof(logdet), x::Union{Number, StridedMatrix{<:Number}})
Ω = logdet(x)
function logdet_pullback(ΔΩ)
∂x = x isa Number ? ΔΩ / x' : ΔΩ * inv(x)'
Expand Down

0 comments on commit c09d9f1

Please sign in to comment.