tf.estimator.EstimatorSpec

Ops and objects returned from a model_fn and passed to an Estimator.

Used in the notebooks

Used in the guide Used in the tutorials

EstimatorSpec fully defines the model to be run by an Estimator.

mode A ModeKeys. Specifies if this is training, evaluation or prediction.
predictions Predictions Tensor or dict of Tensor.
loss Training loss Tensor. Must be either scal