This commit is contained in:
Ali Hamdi 2017-06-08 08:16:12 +02:00
parent 92616a8c3d
commit 547ca64206
2 changed files with 7 additions and 1 deletions

View File

@ -31,7 +31,7 @@ graph(::typeof(svd), x) = svd(x)
for op in (*, .*, .+, .^, log, exp, ceil, floor, sqrt, abs, cos,
sin, tan, atan, asin, acos, tanh, lgamma, erf, erfc, real, imag, conj,
inv)
inv, det)
@eval graph(::typeof($op), args...) = $op(args...)
end

View File

@ -41,6 +41,12 @@ u,s,v = m(A)
m = tf(f)
@test maximum(abs.(m(A)-inv(A))) < error_margin
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# det
@net f(x) = det(x)
m = tf(f)
@test maximum(abs.(m(A)-det(A))) < error_margin
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
end