Skip to content

Commit

Permalink
Fixed radial also in AD-compatibility tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ludoro committed May 13, 2020
1 parent c0bd7f7 commit 0bce50c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/AD_compatibility.jl
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ f = x -> x^2
y = f.(x)

#Radials
my_rad = RadialBasis(x,y,lb,ub,x->norm(x),2)
my_rad = RadialBasis(x,y,lb,ub,linearRadial)
g = x -> my_rad'(x)
g(5.0)

Expand Down Expand Up @@ -245,7 +245,7 @@ f = x -> x[1]*x[2]
y = f.(x)

#Radials
my_rad = RadialBasis(x,y,[lb,ub],z->norm(z),2)
my_rad = RadialBasis(x,y,lb,ub,linearRadial)
g = x -> Zygote.gradient(my_rad,x)
g((2.0,5.0))

Expand Down Expand Up @@ -308,7 +308,7 @@ n_echos = 1
my_neural = NeuralSurrogate(x,y,lb,ub,model,loss,opt,n_echos)
Zygote.gradient(x -> sum(my_neural(x)), (2.0, 5.0))

my_rad = RadialBasis(x,y,[lb,ub],z->norm(z),1)
my_rad = RadialBasis(x,y,lb,ub,linearRadial)
Zygote.gradient(x -> sum(my_rad(x)), (2.0, 5.0))

p = 1.4
Expand Down

0 comments on commit 0bce50c

Please sign in to comment.