Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename TensorProduct and implement TensorCore.tensor #232

Merged
merged 13 commits into from
Jan 20, 2021
3 changes: 1 addition & 2 deletions src/kernels/kerneltensorproduct.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only changed TensorProduct to KernelTensorProduct and added a new docstring. I renamed the file in a separate PR but somehow, in contrast to the tests, Github does not display the changes nicely.

KernelTensorProduct <: Kernel
KernelTensorProduct

Tensor product of kernels.

Expand Down Expand Up @@ -139,7 +139,6 @@ function printshifted(io::IO, kernel::KernelTensorProduct, shift::Int)
for _ in 1:(shift + 1)
print(io, "\t")
end
print(io, "- ")
theogf marked this conversation as resolved.
Show resolved Hide resolved
printshifted(io, k, shift + 2)
end
end
3 changes: 3 additions & 0 deletions test/kernels/kerneltensorproduct.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
@test kernel1 == kernel2
@test kernel1.kernels === (k1, k2) === KernelTensorProduct((k1, k2)).kernels
@test length(kernel1) == length(kernel2) == 2
@test string(kernel1) == (
"Tensor product of 2 kernels:\n\tSquared Exponential Kernel\n\tExponential Kernel"
)
@test_throws DimensionMismatch kernel1(rand(3), rand(3))

@testset "val" begin
Expand Down