code: def __call__(self, step, variables, values):
      # step will reset to zero between calls to minimize(), whereas counter will keep increasing
  
      if (self.counter <= 10) or (
          self.counter % self.holdout_interval
      ) == 0:
          for var, val in zip(variables, values):
              var.assign(val)
  
          self.n_iters.append(self.counter)
          self.log_likelihoods.append(
              self.model.maximum_log_likelihood_objective().numpy()
          )
  
          predictive_mean, predictive_variance = self.model.predict_y(
              self.Xtest
          )
          test_log_likelihood = tf.reduce_mean(
              getLogPredictiveDensities(
                  self.Ytest, predictive_mean, predictive_variance
              )
          )
          self.hold_out_likelihood.append(test_log_likelihood.numpy())
  
      self.counter += 1
  
file_path: GPflow/doc/sphinx/notebooks/theory/FITCvsVFE.py
imports: import numpy
  import tensorflow
  import gpflow
  from gpflow.ci_utils import reduce_in_tests
label_desc: Use image node_id 2 for calling the Callback obj's underlying member method code with example usage: obj.__call__(step, variables, values) without return types