|
1 | 1 | using KernelFunctions
|
2 | 2 | using Distances
|
3 |
| -using FiniteDifferences |
4 |
| -using Flux |
5 | 3 | using Kronecker
|
6 | 4 | using LinearAlgebra
|
7 | 5 | using PDMats
|
8 | 6 | using Random
|
9 | 7 | using SpecialFunctions
|
10 | 8 | using Test
|
11 |
| -using Zygote |
| 9 | +import Zygote, ForwardDiff, ReverseDiff, FiniteDifferences |
12 | 10 |
|
13 | 11 | using KernelFunctions: metric, kappa
|
14 | 12 |
|
@@ -45,66 +43,66 @@ using KernelFunctions: metric, kappa
|
45 | 43 | @testset "KernelFunctions" begin
|
46 | 44 |
|
47 | 45 | include("utils.jl")
|
48 |
| - |
49 |
| - @testset "distances" begin |
50 |
| - include(joinpath("distances", "dotproduct.jl")) |
51 |
| - include(joinpath("distances", "delta.jl")) |
52 |
| - include(joinpath("distances", "sinus.jl")) |
53 |
| - end |
54 |
| - |
55 |
| - @testset "transform" begin |
56 |
| - include(joinpath("transform", "transform.jl")) |
57 |
| - include(joinpath("transform", "scaletransform.jl")) |
58 |
| - include(joinpath("transform", "ardtransform.jl")) |
59 |
| - include(joinpath("transform", "lineartransform.jl")) |
60 |
| - include(joinpath("transform", "functiontransform.jl")) |
61 |
| - include(joinpath("transform", "selecttransform.jl")) |
62 |
| - include(joinpath("transform", "chaintransform.jl")) |
63 |
| - end |
| 46 | + include("utils_AD.jl") |
| 47 | + # @testset "distances" begin |
| 48 | + # include(joinpath("distances", "dotproduct.jl")) |
| 49 | + # include(joinpath("distances", "delta.jl")) |
| 50 | + # include(joinpath("distances", "sinus.jl")) |
| 51 | + # end |
| 52 | + # |
| 53 | + # @testset "transform" begin |
| 54 | + # include(joinpath("transform", "transform.jl")) |
| 55 | + # include(joinpath("transform", "scaletransform.jl")) |
| 56 | + # include(joinpath("transform", "ardtransform.jl")) |
| 57 | + # include(joinpath("transform", "lineartransform.jl")) |
| 58 | + # include(joinpath("transform", "functiontransform.jl")) |
| 59 | + # include(joinpath("transform", "selecttransform.jl")) |
| 60 | + # include(joinpath("transform", "chaintransform.jl")) |
| 61 | + # end |
64 | 62 |
|
65 | 63 | @testset "basekernels" begin
|
66 | 64 | include(joinpath("basekernels", "constant.jl"))
|
67 |
| - include(joinpath("basekernels", "cosine.jl")) |
68 |
| - include(joinpath("basekernels", "exponential.jl")) |
69 |
| - include(joinpath("basekernels", "exponentiated.jl")) |
70 |
| - include(joinpath("basekernels", "fbm.jl")) |
71 |
| - include(joinpath("basekernels", "gabor.jl")) |
72 |
| - include(joinpath("basekernels", "maha.jl")) |
73 |
| - include(joinpath("basekernels", "matern.jl")) |
74 |
| - include(joinpath("basekernels", "nn.jl")) |
75 |
| - include(joinpath("basekernels", "periodic.jl")) |
76 |
| - include(joinpath("basekernels", "polynomial.jl")) |
77 |
| - include(joinpath("basekernels", "piecewisepolynomial.jl")) |
78 |
| - include(joinpath("basekernels", "rationalquad.jl")) |
79 |
| - include(joinpath("basekernels", "sm.jl")) |
80 |
| - include(joinpath("basekernels", "wiener.jl")) |
81 |
| - end |
82 |
| - |
83 |
| - @testset "kernels" begin |
84 |
| - include(joinpath("kernels", "kernelproduct.jl")) |
85 |
| - include(joinpath("kernels", "kernelsum.jl")) |
86 |
| - include(joinpath("kernels", "scaledkernel.jl")) |
87 |
| - include(joinpath("kernels", "tensorproduct.jl")) |
88 |
| - include(joinpath("kernels", "transformedkernel.jl")) |
89 |
| - |
90 |
| - # Legacy tests that don't correspond to anything meaningful in src. Unclear how |
91 |
| - # helpful these are. |
92 |
| - include(joinpath("kernels", "custom.jl")) |
93 |
| - end |
94 |
| - |
95 |
| - @testset "matrix" begin |
96 |
| - include(joinpath("matrix", "kernelmatrix.jl")) |
97 |
| - include(joinpath("matrix", "kernelkroneckermat.jl")) |
98 |
| - include(joinpath("matrix", "kernelpdmat.jl")) |
99 |
| - end |
100 |
| - |
101 |
| - @testset "approximations" begin |
102 |
| - include(joinpath("approximations", "nystrom.jl")) |
| 65 | + # include(joinpath("basekernels", "cosine.jl")) |
| 66 | + # include(joinpath("basekernels", "exponential.jl")) |
| 67 | + # include(joinpath("basekernels", "exponentiated.jl")) |
| 68 | + # include(joinpath("basekernels", "fbm.jl")) |
| 69 | + # include(joinpath("basekernels", "gabor.jl")) |
| 70 | + # include(joinpath("basekernels", "maha.jl")) |
| 71 | + # include(joinpath("basekernels", "matern.jl")) |
| 72 | + # include(joinpath("basekernels", "nn.jl")) |
| 73 | + # include(joinpath("basekernels", "periodic.jl")) |
| 74 | + # include(joinpath("basekernels", "polynomial.jl")) |
| 75 | + # include(joinpath("basekernels", "piecewisepolynomial.jl")) |
| 76 | + # include(joinpath("basekernels", "rationalquad.jl")) |
| 77 | + # include(joinpath("basekernels", "sm.jl")) |
| 78 | + # include(joinpath("basekernels", "wiener.jl")) |
103 | 79 | end
|
104 | 80 |
|
105 |
| - include("generic.jl") |
106 |
| - include("zygote_adjoints.jl") |
107 |
| - include("trainable.jl") |
| 81 | + # @testset "kernels" begin |
| 82 | + # include(joinpath("kernels", "kernelproduct.jl")) |
| 83 | + # include(joinpath("kernels", "kernelsum.jl")) |
| 84 | + # include(joinpath("kernels", "scaledkernel.jl")) |
| 85 | + # include(joinpath("kernels", "tensorproduct.jl")) |
| 86 | + # include(joinpath("kernels", "transformedkernel.jl")) |
| 87 | + # |
| 88 | + # # Legacy tests that don't correspond to anything meaningful in src. Unclear how |
| 89 | + # # helpful these are. |
| 90 | + # include(joinpath("kernels", "custom.jl")) |
| 91 | + # end |
| 92 | + # |
| 93 | + # @testset "matrix" begin |
| 94 | + # include(joinpath("matrix", "kernelmatrix.jl")) |
| 95 | + # include(joinpath("matrix", "kernelkroneckermat.jl")) |
| 96 | + # include(joinpath("matrix", "kernelpdmat.jl")) |
| 97 | + # end |
| 98 | + # |
| 99 | + # @testset "approximations" begin |
| 100 | + # include(joinpath("approximations", "nystrom.jl")) |
| 101 | + # end |
| 102 | + # |
| 103 | + # include("generic.jl") |
| 104 | + # include("zygote_adjoints.jl") |
| 105 | + # include("trainable.jl") |
108 | 106 | end
|
109 | 107 |
|
110 | 108 | # These are legacy tests that I'm not getting rid of, as they appear to be useful, but
|
|
0 commit comments