from ..kern import RBF
self.kern = [RBF(input_dim, ARD=1, lengthscale=fracs[i], name="rbf".format(i)) for i in range(len(Ylist))]
elif isinstance(kernel, Kern):
self.kern = [kernel.copy(name="{}".format(kernel.name, i)) for i in range(len(Ylist))]
else:
assert len(kernel) == len(Ylist), "need one kernel per output"
assert all([isinstance(k, Kern) for k in kernel]), "invalid kernel object detected!"
After Change
elif isinstance(kernel, Kern):
self.kern = []
for i in range(len(Ylist)):
k = kernel.copy()
self.kern.append(k)
else:
assert len(kernel) == len(Ylist), "need one kernel per output"
assert all([isinstance(k, Kern) for k in kernel]), "invalid kernel object detected!"