The Estimator is a high-level API that is officially provided by TensorFlow. One of the advantages of using
tf.estimator is that the code automatically builds a graph and a tensorboard itself. A user only needs to specify required arguments, such as features, optimizer, and labels, and plug into the estimator class.
Just like PyTorch, the Estimator can easily switch to training, evaluation, or test modes without creating individual methods.
Also, estimators are built upon the
tf.keras.layers which simplifies the customization.
It is preferred to know the Estimator usage because TensorFlow offers
TPUEstimator which extends to the Estimator class.
The entire structure of constructing estimator model is shown below.
def model_fn(features, targets, mode, params):