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
7d238c5e
Commit
7d238c5e
authored
Jun 09, 2017
by
Neal Wu
Browse files
Rename the image/label batch variables
parent
71e106fe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
tutorials/image/cifar10/cifar10_multi_gpu_train.py
tutorials/image/cifar10/cifar10_multi_gpu_train.py
+2
-2
No files found.
tutorials/image/cifar10/cifar10_multi_gpu_train.py
View file @
7d238c5e
...
@@ -171,11 +171,11 @@ def train():
...
@@ -171,11 +171,11 @@ def train():
with
tf
.
device
(
'/gpu:%d'
%
i
):
with
tf
.
device
(
'/gpu:%d'
%
i
):
with
tf
.
name_scope
(
'%s_%d'
%
(
cifar10
.
TOWER_NAME
,
i
))
as
scope
:
with
tf
.
name_scope
(
'%s_%d'
%
(
cifar10
.
TOWER_NAME
,
i
))
as
scope
:
# Dequeues one batch for the GPU
# Dequeues one batch for the GPU
image
s
,
label
s
=
batch_queue
.
dequeue
()
image
_batch
,
label
_batch
=
batch_queue
.
dequeue
()
# Calculate the loss for one tower of the CIFAR model. This function
# Calculate the loss for one tower of the CIFAR model. This function
# constructs the entire CIFAR model but shares the variables across
# constructs the entire CIFAR model but shares the variables across
# all towers.
# all towers.
loss
=
tower_loss
(
scope
,
image
s
,
label
s
)
loss
=
tower_loss
(
scope
,
image
_batch
,
label
_batch
)
# Reuse variables for the next tower.
# Reuse variables for the next tower.
tf
.
get_variable_scope
().
reuse_variables
()
tf
.
get_variable_scope
().
reuse_variables
()
...
...
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