code: def test_svgp_white() -> None:
      """
      Tests that the SVGP bound on the likelihood is the same when using
      with and without diagonals when whitening.
      """
      num_latent_gps = default_datum_svgp.Y.shape[1]
      model_1 = SVGP(
          kernel=gpflow.kernels.SquaredExponential(),
          likelihood=default_datum_svgp.lik,
          q_diag=True,
          num_latent_gps=num_latent_gps,
          inducing_variable=default_datum_svgp.Z,
          whiten=True,
      )
      model_2 = SVGP(
          kernel=gpflow.kernels.SquaredExponential(),
          likelihood=default_datum_svgp.lik,
          q_diag=False,
          num_latent_gps=num_latent_gps,
          inducing_variable=default_datum_svgp.Z,
          whiten=True,
      )
      model_1.q_sqrt.assign(default_datum_svgp.qsqrt)
      model_1.q_mu.assign(default_datum_svgp.qmean)
      model_2.q_sqrt.assign(
          np.array(
              [
                  np.diag(default_datum_svgp.qsqrt[:, 0]),
                  np.diag(default_datum_svgp.qsqrt[:, 1]),
              ]
          )
      )
      model_2.q_mu.assign(default_datum_svgp.qmean)
      assert_allclose(
          model_1.elbo(default_datum_svgp.data),
          model_2.elbo(default_datum_svgp.data),
      )
  
file_path: GPflow/tests/gpflow/models/test_svgp.py
imports: from typing import Sequence
  import numpy
  import pytest
  import tensorflow
  from numpy.testing import assert_allclose
  import gpflow
  from gpflow import set_trainable
  from gpflow.base import AnyNDArray
  from gpflow.models import SVGP
label_desc: Use image node_id 2 for calling a global function with example usage: test_svgp_white() without return types