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

Fix errors and typos in the Estimators programmer's guide #19273

Merged
merged 1 commit into from
May 21, 2018
Merged
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
19 changes: 9 additions & 10 deletions tensorflow/docs_src/programmers_guide/estimators.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,17 @@ Note: TensorFlow also includes a deprecated `Estimator` class at

Estimators provide the following benefits:

* You can run Estimators-based models on a local host or on a
* You can run Estimator-based models on a local host or on a
distributed multi-server environment without changing your model.
Furthermore, you can run Estimators-based models on CPUs, GPUs,
Furthermore, you can run Estimator-based models on CPUs, GPUs,
or TPUs without recoding your model.
* Estimators simplify sharing implementations between model developers.
* You can develop a state of the art model with high-level intuitive code,
* You can develop a state of the art model with high-level intuitive code.
In short, it is generally much easier to create models with Estimators
than with the low-level TensorFlow APIs.
* Estimators are themselves built on tf.layers, which
* Estimators are themselves built on @{tf.layers}, which
simplifies customization.
* Estimators build the graph for you. In other words, you don't have to
build the graph.
* Estimators build the graph for you.
* Estimators provide a safe distributed training loop that controls how and
when to:
* build the graph
Expand All @@ -57,7 +56,7 @@ the "plumbing" for you. That is, pre-made Estimators create and manage
pre-made Estimators let you experiment with different model architectures by
making only minimal code changes. @{tf.estimator.DNNClassifier$`DNNClassifier`},
for example, is a pre-made Estimator class that trains classification models
through dense, feed-forward neural networks.
based on dense, feed-forward neural networks.


### Structure of a pre-made Estimators program
Expand All @@ -79,7 +78,7 @@ of the following four steps:
an input function:

def input_fn(dataset):
... # manipulate dataset, extracting feature names and the label
... # manipulate dataset, extracting the feature dict and the label
return feature_dict, label

(See @{$programmers_guide/datasets} for full details.)
Expand All @@ -96,13 +95,13 @@ of the following four steps:
population = tf.feature_column.numeric_column('population')
crime_rate = tf.feature_column.numeric_column('crime_rate')
median_education = tf.feature_column.numeric_column('median_education',
normalizer_fn='lambda x: x - global_education_mean')
normalizer_fn=lambda x: x - global_education_mean)

3. **Instantiate the relevant pre-made Estimator.** For example, here's
a sample instantiation of a pre-made Estimator named `LinearClassifier`:

# Instantiate an estimator, passing the feature columns.
estimator = tf.estimator.Estimator.LinearClassifier(
estimator = tf.estimator.LinearClassifier(
feature_columns=[population, crime_rate, median_education],
)

Expand Down