In order to serve the models, they need to be saved first. In this section, we demonstrate a slightly modified version of the MNIST example from the official TensorFlow documentation, available at the following link: https://www.tensorflow.org/serving/serving_basic.
The TensorFlow team recommends using SavedModel for saving and restoring models built and trained in TensorFlow. According to the TensorFlow documentation: