Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
ResNet50_tensorflow
Commits
c3e2ae5e
"git@developer.sourcefind.cn:modelzoo/internlm_vllm.git" did not exist on "40b3cdf79ea90d20b8adbdea330e3af60d5522bd"
Commit
c3e2ae5e
authored
Jun 08, 2017
by
Toby Boyd
Browse files
Fixed typos and redudant with CPU:0
parent
3909e4bd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
6 deletions
+3
-6
tutorials/image/cifar10/cifar10_multi_gpu_train.py
tutorials/image/cifar10/cifar10_multi_gpu_train.py
+1
-4
tutorials/image/cifar10/cifar10_train.py
tutorials/image/cifar10/cifar10_train.py
+2
-2
No files found.
tutorials/image/cifar10/cifar10_multi_gpu_train.py
View file @
c3e2ae5e
...
@@ -162,10 +162,7 @@ def train():
...
@@ -162,10 +162,7 @@ def train():
opt
=
tf
.
train
.
GradientDescentOptimizer
(
lr
)
opt
=
tf
.
train
.
GradientDescentOptimizer
(
lr
)
# Get images and labels for CIFAR-10.
# Get images and labels for CIFAR-10.
# Force input pipeline to CPU:0 to avoid opertaios sometimes ending up on GPU
images
,
labels
=
cifar10
.
distorted_inputs
()
# and resulting in a slow down.
with
tf
.
device
(
'/CPU:0'
):
images
,
labels
=
cifar10
.
distorted_inputs
()
# Calculate the gradients for each model tower.
# Calculate the gradients for each model tower.
tower_grads
=
[]
tower_grads
=
[]
...
...
tutorials/image/cifar10/cifar10_train.py
View file @
c3e2ae5e
...
@@ -62,8 +62,8 @@ def train():
...
@@ -62,8 +62,8 @@ def train():
global_step
=
tf
.
contrib
.
framework
.
get_or_create_global_step
()
global_step
=
tf
.
contrib
.
framework
.
get_or_create_global_step
()
# Get images and labels for CIFAR-10.
# Get images and labels for CIFAR-10.
# Force input pipeline to CPU:0 to avoid oper
t
aios sometimes ending up
# Force input pipeline to CPU:0 to avoid opera
t
io
n
s sometimes ending up
on
#
on
GPU and resulting in a slow down.
# GPU and resulting in a slow down.
with
tf
.
device
(
'/CPU:0'
):
with
tf
.
device
(
'/CPU:0'
):
images
,
labels
=
cifar10
.
distorted_inputs
()
images
,
labels
=
cifar10
.
distorted_inputs
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment