import GPy
# the name of kernel
kernel_name = ‘Matern32’
# get class from module
kernel_class = getattr(GPy.kern, kernel_name)
# generate instance
input_dim = 2
kernel_instance = kernel_class(input_dim)
import GPy
# the name of kernel
kernel_name = ‘Matern32’
# get class from module
kernel_class = getattr(GPy.kern, kernel_name)
# generate instance
input_dim = 2
kernel_instance = kernel_class(input_dim)