Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more doc for the dict returned by an estimator's evaluate() method #21753

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions tensorflow/docs_src/guide/premade_estimators.md
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,8 @@ Running this code yields the following output (or something similar):
Test set accuracy: 0.967
```

The `eval_result` dictionary also contains the `average_loss` (mean loss per sample), the `loss` (mean loss per mini-batch) and the value of the estimator's `global_step` (the number of training iterations it underwent).

### Making predictions (inferring) from the trained model

We now have a trained model that produces good evaluation results.
Expand Down
6 changes: 5 additions & 1 deletion tensorflow/python/estimator/estimator.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,11 @@ def evaluate(self, input_fn, steps=None, hooks=None, checkpoint_path=None,
Returns:
A dict containing the evaluation metrics specified in `model_fn` keyed by
name, as well as an entry `global_step` which contains the value of the
global step for which this evaluation was performed.
global step for which this evaluation was performed. For canned
estimators, the dict contains the `loss` (mean loss per mini-batch) and
the `average_loss` (mean loss per sample). Canned classifiers also return
the `accuracy`. Canned regressors also return the `label/mean` and the
`prediction/mean`.

Raises:
ValueError: If `steps <= 0`.
Expand Down