diff --git a/Project.toml b/Project.toml index d30b187..7a742ed 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "NonconvexSemidefinite" uuid = "9e21ff56-eb25-42d3-b86f-5b0612f555e7" authors = ["Mohamed Tarek and contributors"] -version = "0.1.6" +version = "0.1.7" [deps] ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" diff --git a/src/NonconvexSemidefinite.jl b/src/NonconvexSemidefinite.jl index 7a348b6..75d0fd3 100644 --- a/src/NonconvexSemidefinite.jl +++ b/src/NonconvexSemidefinite.jl @@ -149,9 +149,9 @@ catch err end function ChainRulesCore.rrule(rc::RuleConfig, ::typeof(safe_logdet), A::AbstractMatrix) try - return rrule_via_ad(rc, logdet, A) + return rrule_via_ad(rc, A -> logdet(cholesky(A)), A) catch - -Inf, _ -> (NoTangent(), similar(A) .= NaN) + return -Inf, _ -> (NoTangent(), similar(A) .= NaN) end end