Correct some tf.contrib references that have recently moved to core in contrib/learn/README.md

PiperOrigin-RevId: 218269955
This commit is contained in:
A. Unique TensorFlower 2018-10-22 18:27:46 -07:00 committed by TensorFlower Gardener
parent 236725c044
commit 93291a964b

View File

@ -7,12 +7,11 @@ warnings. A high-level overview is below.
## Canned Estimators ## Canned Estimators
Many canned estimators (subclasses of `Estimator`) have equivalents in core: Many canned estimators (subclasses of `Estimator`) have equivalents in core
exposed under `tf.estimator`:
`DNNClassifier`, `DNNRegressor`, `DNNEstimator`, `LinearClassifier`, `DNNClassifier`, `DNNRegressor`, `DNNEstimator`, `LinearClassifier`,
`LinearRegressor`, `DNNLinearCombinedClassifier` and `LinearRegressor`, `LinearEstimator`, `DNNLinearCombinedClassifier`,
`DNNLinearCombinedRegressor`. They are exposed under `tf.estimator`. `DNNLinearCombinedRegressor` and `DNNLinearCombinedEstimator`.
`DNNEstimator`, `LinearEstimator` and `DNNLinearCombinedEstimator`
are exposed under `tf.contrib.estimator`.
To migrate to the new api, users need to take the following steps: To migrate to the new api, users need to take the following steps:
@ -45,7 +44,7 @@ To migrate to the new api, users need to take the following steps:
`tf.contrib.learn` classifiers and regressors supported labels with shape `tf.contrib.learn` classifiers and regressors supported labels with shape
`[batch_size]`. `[batch_size]`.
* If you pass custom metrics from the `evaluate()` method call, use * If you pass custom metrics from the `evaluate()` method call, use
`tf.contrib.estimator.add_metrics`. `tf.estimator.add_metrics`.
* Replace your `serving_input_fn` with a `serving_input_receiver_fn`. * Replace your `serving_input_fn` with a `serving_input_receiver_fn`.
Note this should be entirely distinct from your training `input_fn`, so if you Note this should be entirely distinct from your training `input_fn`, so if you
previously had one `input_fn` with different "modes", you should now factor previously had one `input_fn` with different "modes", you should now factor
@ -66,7 +65,7 @@ Some remaining estimators/classes:
* `LinearComposableModel` and `DNNComposableModel`: Not supported. * `LinearComposableModel` and `DNNComposableModel`: Not supported.
Consider `tf.contrib.estimator.DNNEstimator`, or write a custom model_fn. Consider `tf.contrib.estimator.DNNEstimator`, or write a custom model_fn.
* `MetricSpec`: Deprecated. For adding custom metrics to canned Estimators, use * `MetricSpec`: Deprecated. For adding custom metrics to canned Estimators, use
`tf.contrib.estimator.add_metrics`. `tf.estimator.add_metrics`.
## Estimator ## Estimator
`tf.contrib.learn.Estimator` is migrated to `tf.estimator.Estimator`. `tf.contrib.learn.Estimator` is migrated to `tf.estimator.Estimator`.