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
ef57c2fc
Commit
ef57c2fc
authored
Aug 31, 2016
by
Jon Shlens
Committed by
GitHub
Aug 31, 2016
Browse files
Merge pull request #354 from mfigurnov/cost-bugfix
Do not perform averaging of the cost.
parents
761c59c4
dc340239
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
4 deletions
+1
-4
resnet/resnet_model.py
resnet/resnet_model.py
+1
-4
No files found.
resnet/resnet_model.py
View file @
ef57c2fc
...
@@ -122,10 +122,7 @@ class ResNet(object):
...
@@ -122,10 +122,7 @@ class ResNet(object):
self
.
cost
=
tf
.
reduce_mean
(
xent
,
name
=
'xent'
)
self
.
cost
=
tf
.
reduce_mean
(
xent
,
name
=
'xent'
)
self
.
cost
+=
self
.
_decay
()
self
.
cost
+=
self
.
_decay
()
moving_avg
=
tf
.
train
.
ExponentialMovingAverage
(
tf
.
scalar_summary
(
'cost'
,
self
.
cost
)
0.99
,
num_updates
=
self
.
global_step
,
name
=
'moving_avg'
)
self
.
_extra_train_ops
.
append
(
moving_avg
.
apply
([
self
.
cost
]))
tf
.
scalar_summary
(
'cost'
,
moving_avg
.
average
(
self
.
cost
))
def
_build_train_op
(
self
):
def
_build_train_op
(
self
):
"""Build training specific ops for the graph."""
"""Build training specific ops for the graph."""
...
...
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