Skip to content

Commit

Permalink
Merge pull request tensorflow#3615 from iver56/add-imports
Browse files Browse the repository at this point in the history
Add missing imports in TF learn examples
  • Loading branch information
zheng-xq authored Aug 5, 2016
2 parents 9f47ac6 + 83277ee commit 2aec2b6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tensorflow/contrib/learn/python/learn/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ Below are few simple examples of the API. For more examples, please see [example
Simple linear classification:

```python
import tensorflow.contrib.learn.python.learn as learn
from sklearn import datasets, metrics

iris = datasets.load_iris()
Expand All @@ -70,6 +71,7 @@ print("Accuracy: %f" % score)
Simple linear regression:

```python
import tensorflow.contrib.learn.python.learn as learn
from sklearn import datasets, metrics, preprocessing

boston = datasets.load_boston()
Expand All @@ -85,6 +87,7 @@ print ("MSE: %f" % score)
Example of 3 layer network with 10, 20 and 10 hidden units respectively:

```python
import tensorflow.contrib.learn.python.learn as learn
from sklearn import datasets, metrics

iris = datasets.load_iris()
Expand All @@ -99,6 +102,7 @@ print("Accuracy: %f" % score)
Example of how to pass a custom model to the Estimator:

```python
import tensorflow.contrib.learn.python.learn as learn
from sklearn import datasets, metrics

iris = datasets.load_iris()
Expand Down

0 comments on commit 2aec2b6

Please sign in to comment.