code: def test_svgp_fixing_q_sqrt() -> None:
      """
      In response to bug #46, we need to make sure that the q_sqrt matrix can be fixed
      """
      num_latent_gps = default_datum_svgp.Y.shape[1]
      model = 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=False,
      )
      default_num_trainable_variables = len(model.trainable_variables)
      set_trainable(model.q_sqrt, False)
      assert (
          len(model.trainable_variables)
          == default_num_trainable_variables - 1
      )
  
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 1 for calling a global function with example usage: test_svgp_fixing_q_sqrt() without return types