code: def test_svgp_multiclass() -> None:
      num_classes = 3
      model = gpflow.models.SVGP(
          gpflow.kernels.SquaredExponential(),
          gpflow.likelihoods.MultiClass(num_classes=num_classes),
          inducing_variable=Datum.X.copy(),
          num_latent_gps=num_classes,
      )
      gpflow.set_trainable(model.inducing_variable, False)
  
      # lambda because: https://github.com/GPflow/GPflow/issues/1929
      elbo_lambda = lambda data: model.elbo(data)
  
      # test with explicitly unknown shapes:
      tensor_spec = tf.TensorSpec(shape=None, dtype=default_float())
      elbo = tf.function(
          elbo_lambda,
          input_signature=[(tensor_spec, tensor_spec)],
      )
  
      @tf.function
      def model_closure() -> tf.Tensor:
          return -elbo(Datum.cdata)
  
      model_closure()  # Trigger compilation.
  
      opt = gpflow.optimizers.Scipy()
  
      # simply test whether it runs without erroring...:
      opt.minimize(
          model_closure,
          variables=model.trainable_variables,
          options=dict(maxiter=3),
          compile=True,
      )
  
file_path: GPflow/tests/integration/test_dynamic_shapes.py
imports: import numpy
  import pytest
  import tensorflow
  from check_shapes import ShapeChecker
  import gpflow
  from gpflow.base import AnyNDArray
  from gpflow.config import default_float
label_desc: Use image node_id 4 for calling a global function with example usage: test_svgp_multiclass() and returns: unknown