move jacobian test to Tracker
This commit is contained in:
parent
82ee61f5be
commit
f9d8ea81fb
|
@ -1,5 +1,5 @@
|
|||
using Flux
|
||||
using Flux: throttle, jacobian, glorot_uniform, glorot_normal, stack, unstack
|
||||
using Flux: throttle, glorot_uniform, glorot_normal, stack, unstack
|
||||
using StatsBase: std
|
||||
using Random
|
||||
using Test
|
||||
|
@ -52,15 +52,6 @@ using Test
|
|||
end
|
||||
end
|
||||
|
||||
@testset "Jacobian" begin
|
||||
A = param(randn(2,2))
|
||||
x = randn(2)
|
||||
m(x) = A*x
|
||||
y = m(x)
|
||||
J = jacobian(m,x)
|
||||
@test J ≈ A.data
|
||||
end
|
||||
|
||||
@testset "Initialization" begin
|
||||
# Set random seed so that these tests don't fail randomly
|
||||
Random.seed!(0)
|
||||
|
|
Loading…
Reference in New Issue