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
27e86174
Commit
27e86174
authored
Feb 11, 2019
by
Toby Boyd
Committed by
Dong Lin
Feb 11, 2019
Browse files
Fix accuracy name (#6179)
parent
c9285547
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
official/resnet/estimator_cifar_benchmark.py
official/resnet/estimator_cifar_benchmark.py
+4
-4
official/resnet/keras/keras_benchmark.py
official/resnet/keras/keras_benchmark.py
+2
-2
No files found.
official/resnet/estimator_cifar_benchmark.py
View file @
27e86174
...
...
@@ -19,8 +19,8 @@ from __future__ import division
from
__future__
import
print_function
import
json
import
time
import
os
import
time
from
absl
import
flags
from
absl.testing
import
flagsaver
...
...
@@ -88,7 +88,7 @@ class EstimatorCifar10BenchmarkTests(tf.test.Benchmark):
self
.
_run_and_report_benchmark
()
def
unit_test
(
self
):
"""A lightweig
t
h test that can finish quickly"""
"""A lightweigh
t
test that can finish quickly
.
"""
self
.
_setup
()
flags
.
FLAGS
.
num_gpus
=
1
flags
.
FLAGS
.
data_dir
=
DATA_DIR
...
...
@@ -108,7 +108,7 @@ class EstimatorCifar10BenchmarkTests(tf.test.Benchmark):
iters
=
stats
[
'global_step'
],
wall_time
=
wall_time_sec
,
extras
=
{
'accuracy'
:
'accuracy
_top_1
'
:
self
.
_json_description
(
stats
[
'accuracy'
].
item
(),
priority
=
0
),
'accuracy_top_5'
:
self
.
_json_description
(
stats
[
'accuracy_top_5'
].
item
()),
...
...
@@ -119,7 +119,7 @@ class EstimatorCifar10BenchmarkTests(tf.test.Benchmark):
priority
=
None
,
min_value
=
None
,
max_value
=
None
):
"""Get a json-formatted string describing the attributes for a metric"""
"""Get a json-formatted string describing the attributes for a metric
.
"""
attributes
=
{}
attributes
[
'value'
]
=
value
...
...
official/resnet/keras/keras_benchmark.py
View file @
27e86174
...
...
@@ -65,7 +65,7 @@ class KerasBenchmark(tf.test.Benchmark):
log_steps
=
None
,
total_batch_size
=
None
,
warmup
=
1
):
"""Report benchmark results by writing to local protobuf file
"""Report benchmark results by writing to local protobuf file
.
Args:
stats: dict returned from keras models with known entries.
...
...
@@ -79,7 +79,7 @@ class KerasBenchmark(tf.test.Benchmark):
extras
=
{}
if
'accuracy_top_1'
in
stats
:
extras
[
'accuracy'
]
=
self
.
_json_description
(
extras
[
'accuracy
_top_1
'
]
=
self
.
_json_description
(
stats
[
'accuracy_top_1'
],
priority
=
0
,
min_value
=
top_1_min
,
...
...
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