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
b5acc005
Commit
b5acc005
authored
Jun 08, 2017
by
Neal Wu
Committed by
GitHub
Jun 08, 2017
Browse files
Code cleanup
parent
9e8fd6d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
tutorials/image/cifar10/cifar10_multi_gpu_train.py
tutorials/image/cifar10/cifar10_multi_gpu_train.py
+2
-4
No files found.
tutorials/image/cifar10/cifar10_multi_gpu_train.py
View file @
b5acc005
...
@@ -67,14 +67,13 @@ def tower_loss(scope, images, labels):
...
@@ -67,14 +67,13 @@ def tower_loss(scope, images, labels):
Args:
Args:
scope: unique prefix string identifying the CIFAR tower, e.g. 'tower_0'
scope: unique prefix string identifying the CIFAR tower, e.g. 'tower_0'
images: Images. 4D tensor of [batch_size, height, width, 3]
size
.
images: Images. 4D tensor of
shape
[batch_size, height, width, 3].
labels: Labels. 1D tensor of [batch_size]
size
.
labels: Labels. 1D tensor of
shape
[batch_size].
Returns:
Returns:
Tensor of shape [] containing the total loss for a batch of data
Tensor of shape [] containing the total loss for a batch of data
"""
"""
# Build inference Graph.
# Build inference Graph.
logits
=
cifar10
.
inference
(
images
)
logits
=
cifar10
.
inference
(
images
)
...
@@ -138,7 +137,6 @@ def average_gradients(tower_grads):
...
@@ -138,7 +137,6 @@ def average_gradients(tower_grads):
def
train
():
def
train
():
print
(
FLAGS
.
batch_size
)
"""Train CIFAR-10 for a number of steps."""
"""Train CIFAR-10 for a number of steps."""
with
tf
.
Graph
().
as_default
(),
tf
.
device
(
'/cpu:0'
):
with
tf
.
Graph
().
as_default
(),
tf
.
device
(
'/cpu:0'
):
# Create a variable to count the number of train() calls. This equals the
# Create a variable to count the number of train() calls. This equals the
...
...
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