gpflow.optimizers.natgrad#

Functions#

gpflow.optimizers.natgrad.expectation_to_meanvarsqrt#

gpflow.optimizers.natgrad.expectation_to_meanvarsqrt(eta1, eta2)[source]#
Parameters:
  • eta1 (Tensor) –

  • eta2 (Tensor) –

Return type:

Tuple[Tensor, Tensor]

gpflow.optimizers.natgrad.expectation_to_natural#

gpflow.optimizers.natgrad.expectation_to_natural(eta1, eta2)[source]#
Parameters:
  • eta1 (Tensor) –

  • eta2 (Tensor) –

Return type:

Tuple[Tensor, Tensor]

gpflow.optimizers.natgrad.meanvarsqrt_to_expectation#

gpflow.optimizers.natgrad.meanvarsqrt_to_expectation(m, v_sqrt)[source]#
Parameters:
  • m (Tensor) –

  • v_sqrt (Tensor) –

Return type:

Tuple[Tensor, Tensor]

gpflow.optimizers.natgrad.meanvarsqrt_to_natural#

gpflow.optimizers.natgrad.meanvarsqrt_to_natural(mu, s_sqrt)[source]#
Parameters:
  • mu (Tensor) –

  • s_sqrt (Tensor) –

Return type:

Tuple[Tensor, Tensor]

gpflow.optimizers.natgrad.natural_to_expectation#

gpflow.optimizers.natgrad.natural_to_expectation(nat1, nat2)[source]#
Parameters:
  • nat1 (Tensor) –

  • nat2 (Tensor) –

Return type:

Tuple[Tensor, Tensor]

gpflow.optimizers.natgrad.natural_to_meanvarsqrt#

gpflow.optimizers.natgrad.natural_to_meanvarsqrt(nat1, nat2)[source]#
Parameters:
  • nat1 (Tensor) –

  • nat2 (Tensor) –

Return type:

Tuple[Tensor, Tensor]

gpflow.optimizers.natgrad.swap_dimensions#

gpflow.optimizers.natgrad.swap_dimensions(method)[source]#

Converts between GPflow indexing and tensorflow indexing method is a function that broadcasts over the first dimension (i.e. like all tensorflow matrix ops):

  • method inputs [D, N, 1], [D, N, N]

  • method outputs [D, N, 1], [D, N, N]

Return type:

Callable[..., Tuple[Tensor, Tensor]]

Returns:

Function that broadcasts over the final dimension (i.e. compatible with GPflow):

  • inputs: [N, D], [D, N, N]

  • outputs: [N, D], [D, N, N]

Parameters:

method (Callable[[Tensor, Tensor], Tuple[Tensor, Tensor]]) –