code: def __init__(
      self,
      num_mixtures: Optional[int] = 5,
      inner_dims: Optional[list] = [10, 10],
      activation: Optional[
          Callable[[tf.Tensor], tf.Tensor]
      ] = tf.keras.activations.relu,
  ):
      super().__init__()
  
      # `self.dims` collects the neural net's input, hidden and output dimensions.
      # The number of output dims `self.dims[-1]` equals `num_mixtures` means +
      # `num _mixtures` variances + `num_mixtures` weights, a total of
      # 3 times `num_mixtures` variables.
      self.dims = [1] + list(inner_dims) + [3 * num_mixtures]
      self.activation = activation
      self._create_network()
  
file_path: GPflow/doc/sphinx/notebooks/tailor/mixture_density_network.pct.py
imports: import matplotlib.pyplot
  import numpy
  from typing import Callable, Optional, Tuple
  import tensorflow
  from gpflow.base import Parameter
  from gpflow.models import BayesianModel, ExternalDataTrainingLossMixin
  from gpflow.utilities import print_summary
  from gpflow.ci_utils import reduce_in_tests
  from gpflow.optimizers import Scipy
  from sklearn.datasets import make_moons
label_desc: Use image node_id 1 to create a new MDN object from inherited base classes: BayesianModel, ExternalDataTrainingLossMixin with example: obj = MDN(num_mixtures, inner_dims, activation)