diff --git a/src/backend/tensorflow/graph.jl b/src/backend/tensorflow/graph.jl index 63c4f4e2..21258ecf 100644 --- a/src/backend/tensorflow/graph.jl +++ b/src/backend/tensorflow/graph.jl @@ -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, det) + inv, det, transpose) @eval graph(::typeof($op), args...) = $op(args...) end diff --git a/test/backend/tensorflow.jl b/test/backend/tensorflow.jl index 178de761..7bbb39d5 100644 --- a/test/backend/tensorflow.jl +++ b/test/backend/tensorflow.jl @@ -29,6 +29,8 @@ end @test A ≈ u*diagm(s)*transpose(v) @test tf(@net x -> inv(x))(A) ≈ inv(A) @test tf(@net x -> det(x))(A) ≈ det(A) + A = randn(Float32,(6,3)) + @test tf(@net x -> transpose(x))(A) ≈ transpose(A) end end