diff options
author | Akshay Modi <nareshmodi@google.com> | 2018-06-18 11:48:36 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-06-18 11:55:03 -0700 |
commit | 148b4381fd0259cae441e459ec8ebe2c5d557722 (patch) | |
tree | c66c96ea6c60c63385b528dce195af802b8acf3b /tensorflow/examples | |
parent | fc03fbff3dd7a58fa4f16226df4ada1f21f8b53f (diff) |
Automated g4 rollback of changelist 201011811
PiperOrigin-RevId: 201033171
Diffstat (limited to 'tensorflow/examples')
-rw-r--r-- | tensorflow/examples/learn/iris.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tensorflow/examples/learn/iris.py b/tensorflow/examples/learn/iris.py index 86f5204ec3..03e60972aa 100644 --- a/tensorflow/examples/learn/iris.py +++ b/tensorflow/examples/learn/iris.py @@ -21,8 +21,7 @@ from __future__ import division from __future__ import print_function import os - -from six.moves.urllib.request import urlretrieve +import urllib import tensorflow as tf @@ -39,7 +38,9 @@ FEATURE_KEYS = ['sepal_length', 'sepal_width', 'petal_length', 'petal_width'] def maybe_download_iris_data(file_name, download_url): """Downloads the file and returns the number of data.""" if not os.path.exists(file_name): - urlretrieve(download_url, file_name) + raw = urllib.urlopen(download_url).read() + with open(file_name, 'w') as f: + f.write(raw) # The first line is a comma-separated string. The first one is the number of # total data in the file. |