code: def loss() -> tf.Tensor:
      Y_predicted = model.predict(X_train)
      squared_error = (Y_predicted - Y_train) ** 2
      return tf.reduce_mean(squared_error)
  
file_path: GPflow/doc/sphinx/notebooks/getting_started/parameters_and_their_optimisation.pct.py
imports: import os
  import warnings
  from typing import Optional
  import matplotlib.pyplot
  import numpy
  import pandas
  import tensorflow
  import tensorflow_probability
  from check_shapes import check_shapes
  from matplotlib.axes import Axes
  import gpflow
  from gpflow.ci_utils import is_continuous_integration
label_desc: Use image node_id 1 for calling a global function with example usage: loss() and returns: tf