Skip to content

Commit

Permalink
Fixed typos and redudant with CPU:0
Browse files Browse the repository at this point in the history
  • Loading branch information
tfboyd committed Jun 8, 2017
1 parent 3909e4b commit c3e2ae5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 1 addition & 4 deletions tutorials/image/cifar10/cifar10_multi_gpu_train.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand Down
4 changes: 2 additions & 2 deletions tutorials/image/cifar10/cifar10_train.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit c3e2ae5

Please sign in to comment.