From c3e2ae5ec1b0164ddd3895680c249d0adb1f11a8 Mon Sep 17 00:00:00 2001 From: Toby Boyd Date: Thu, 8 Jun 2017 13:49:27 -0700 Subject: [PATCH] Fixed typos and redudant with CPU:0 --- tutorials/image/cifar10/cifar10_multi_gpu_train.py | 5 +---- tutorials/image/cifar10/cifar10_train.py | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/tutorials/image/cifar10/cifar10_multi_gpu_train.py b/tutorials/image/cifar10/cifar10_multi_gpu_train.py index 05d92cc27e..9f269cc04a 100644 --- a/tutorials/image/cifar10/cifar10_multi_gpu_train.py +++ b/tutorials/image/cifar10/cifar10_multi_gpu_train.py @@ -162,10 +162,7 @@ def train(): opt = tf.train.GradientDescentOptimizer(lr) # Get images and labels for CIFAR-10. - # Force input pipeline to CPU:0 to avoid opertaios sometimes ending up on GPU - # and resulting in a slow down. - with tf.device('/CPU:0'): - images, labels = cifar10.distorted_inputs() + images, labels = cifar10.distorted_inputs() # Calculate the gradients for each model tower. tower_grads = [] diff --git a/tutorials/image/cifar10/cifar10_train.py b/tutorials/image/cifar10/cifar10_train.py index da01d50014..e324352792 100644 --- a/tutorials/image/cifar10/cifar10_train.py +++ b/tutorials/image/cifar10/cifar10_train.py @@ -62,8 +62,8 @@ def train(): global_step = tf.contrib.framework.get_or_create_global_step() # Get images and labels for CIFAR-10. - # Force input pipeline to CPU:0 to avoid opertaios sometimes ending up - # on GPU and resulting in a slow down. + # Force input pipeline to CPU:0 to avoid operations sometimes ending up on + # GPU and resulting in a slow down. with tf.device('/CPU:0'): images, labels = cifar10.distorted_inputs()