gpflux.runtime_checks#

Runtime checks

Module Contents#

exception GPLayerIncompatibilityException[source]#

Bases: Exception

This exception is raised when GPLayer is misconfigured. This can be caused by multiple reasons, but common misconfigurations are:

  • Incompatible or wrong type of Kernel, InducingVariables and/or MeanFunction.

  • Incompatible number of latent GPs specified.

Initialize self. See help(type(self)) for accurate signature.

verify_compatibility(kernel: gpflow.kernels.MultioutputKernel, mean_function: gpflow.mean_functions.MeanFunction, inducing_variable: gpflow.inducing_variables.MultioutputInducingVariables) Tuple[int, int][source]#

Checks that the arguments are all compatible with each other for use in a GPLayer.

Parameters:
  • kernel – The multioutput kernel for the layer.

  • inducing_variable – The inducing features for the layer.

  • mean_function – The mean function applied to the inputs.

Raises:

GPLayerIncompatibilityException – If an incompatibility is detected.

Returns:

number of inducing variables and number of latent GPs