aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/examples/learn
diff options
context:
space:
mode:
authorGravatar Dandelion Mané <dandelion@google.com>2017-03-10 14:43:23 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-03-10 15:18:15 -0800
commit0386a01ad3beb28364599d82199be1c0837b3fa9 (patch)
tree3a1d2ef947a7bf37286efc0e8ff760e0401ab319 /tensorflow/examples/learn
parente73ceaebb209a1e577e7240fba41c692c89143d0 (diff)
Merge changes from github.
Change: 149800363
Diffstat (limited to 'tensorflow/examples/learn')
-rw-r--r--tensorflow/examples/learn/iris.py4
-rwxr-xr-xtensorflow/examples/learn/resnet.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/tensorflow/examples/learn/iris.py b/tensorflow/examples/learn/iris.py
index ad01f3544a..0c29caf9c7 100644
--- a/tensorflow/examples/learn/iris.py
+++ b/tensorflow/examples/learn/iris.py
@@ -16,7 +16,7 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
-from sklearn import cross_validation
+from sklearn import model_selection
from sklearn import metrics
import tensorflow as tf
@@ -24,7 +24,7 @@ import tensorflow as tf
def main(unused_argv):
# Load dataset.
iris = tf.contrib.learn.datasets.load_dataset('iris')
- x_train, x_test, y_train, y_test = cross_validation.train_test_split(
+ x_train, x_test, y_train, y_test = model_selection.train_test_split(
iris.data, iris.target, test_size=0.2, random_state=42)
# Build 3 layer DNN with 10, 20, 10 units respectively.
diff --git a/tensorflow/examples/learn/resnet.py b/tensorflow/examples/learn/resnet.py
index f822903208..7737f10495 100755
--- a/tensorflow/examples/learn/resnet.py
+++ b/tensorflow/examples/learn/resnet.py
@@ -181,7 +181,7 @@ result = classifier.evaluate(
y=mnist.test.labels,
metrics={
'accuracy':
- tf.contrib.learn.metric_spec.MetricSpec(
+ tf.contrib.learn.MetricSpec(
metric_fn=tf.contrib.metrics.streaming_accuracy,
prediction_key='accuracy'),
})