Closed
Description
Similar to #458 there seems to be an issue with product of kernels.
Basic cases like SqExponentialKernel() * SqExponentialKernel()
work fine but more nested kernels have issues.
In particular, this does not seem to work:
using Test, KernelFunctions
x = rand(10, 2);
k = RBFKernel() * ((LinearKernel() + 1.0 * CosineKernel() * RBFKernel()) ∘ SelectTransform(1));
@inferred kernelmatrix(k, RowVecs(x))
ERROR: return type Matrix{Float64} does not match inferred return type Any
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:35
[2] top-level scope
@ REPL[31]:1
I will try to make a PR similar to #459 to solve the issue.
Metadata
Metadata
Assignees
Labels
No labels