def test_gplvm(model_class, X, y, kernel, likelihood): if model_class is SparseGPRegression or model_class is VariationalSparseGP: gp = model_class(X, y, kernel, X, likelihood) else: gp = model_class(X, y, kernel, likelihood) gplvm = GPLVM(gp) # test inference gplvm.optimize(num_steps=1) # test forward gplvm(Xnew=X)