class_docstr: Bayesian model.
  
  This is a base class for all GPflow models. See also :class:`GPModel`.
  
  A bayesian model provides methods for computing prior- and posterior densities, and a maximum
  likelihood objective; allowing you to use generic code to optimise model parameters to fit data.
  
  Most bayesian models are expected to hold their data internally, but the methods take ``*args``
  and ``**kwargs`` allowing you to write implementations that take data as parameters.
  See also :class:`gpflow.models.training_mixins.InternalDataTrainingLossMixin`,
  :class:`gpflow.models.training_mixins.ExternalDataTrainingLossMixin`,
  and :func:`gpflow.models.training_loss`.
docstr: Sum of the log prior probability densities of all (constrained) variables in this model.
docstr_tok: ["Sum","of","the","log","prior","probability","densities","of","all","(","constrained",")","variables","in","this","model","."]
code: def log_prior_density(self) -> tf.Tensor:
      """
      Sum of the log prior probability densities of all (constrained) variables in this model.
      """
      if self.trainable_parameters:
          return tf.add_n(
              [p.log_prior_density() for p in self.trainable_parameters]
          )
      else:
          return to_default_float(0.0)
  
imports: import abc
  from typing import Any, Optional
  import tensorflow
  from check_shapes import check_shapes
  from ..base import InputData, MeanAndVariance, Module, RegressionData
  from ..conditionals.util import sample_mvn
  from ..kernels import Kernel, MultioutputKernel
  from ..likelihoods import Likelihood, SwitchedLikelihood
  from ..mean_functions import MeanFunction, Zero
  from ..utilities import assert_params_false, to_default_float
label_desc: Use image node_id 1 for calling the BayesianModel obj's underlying member method code with example usage: obj.log_prior_density() and returns: tf, to_default_float