yamle.models.gp module#
- class yamle.models.gp.GPModel(prior_mean, prior_covariance, inducing_points, num_latent, num_outputs, task)[source]#
Bases:
ApproximateGPThis class is used to create a Gaussian Process model with the given parameters.
- Parameters:
prior_mean¶ (str) – The prior mean function. Can be ‘zero’ or ‘constant’.
prior_covariance¶ (str) – The prior covariance function. Can be ‘rbf’, ‘matern32’, ‘matern52’.
inducing_points¶ (torch.Tensor) – The inducing points.
num_latent¶ (int) – The latent dimension.
num_outputs¶ (int) – The number of outputs.
task¶ (str) – The task to perform. Either ‘classification’ or ‘regression’. The task determined is softmax is used for the output layer.
- forward(x, staged_output=False, input_kwargs={}, output_kwargs={})[source]#
This function is used to perform the forward pass of the model.
- Parameters:
- Return type:
Union[Tensor,Tuple[Tensor,List[Tensor]]]
- add_method_specific_layers(method)[source]#
This method is used to add method specific layers to the model.
- Parameters:
method¶ (str) – The method to use.
- Return type:
None
-
training:
bool#