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
ff5cef9a
"git@developer.sourcefind.cn:modelzoo/resnet50_tensorflow.git" did not exist on "9caaba0c4528cd846a847614e816a63d145f6e2c"
Unverified
Commit
ff5cef9a
authored
Apr 24, 2019
by
Toby Boyd
Committed by
GitHub
Apr 24, 2019
Browse files
Add top_1 accuracy check. (#6663)
parent
05b9122f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
official/resnet/estimator_cifar_benchmark.py
official/resnet/estimator_cifar_benchmark.py
+6
-1
No files found.
official/resnet/estimator_cifar_benchmark.py
View file @
ff5cef9a
...
...
@@ -28,6 +28,9 @@ import tensorflow as tf # pylint: disable=g-bad-import-order
from
official.resnet
import
cifar10_main
as
cifar_main
from
official.utils.logs
import
hooks
MIN_TOP_1_ACCURACY
=
0.926
MAX_TOP_1_ACCURACY
=
0.938
class
EstimatorCifar10BenchmarkTests
(
tf
.
test
.
Benchmark
):
"""Benchmarks and accuracy tests for Estimator ResNet56."""
...
...
@@ -128,7 +131,9 @@ class EstimatorCifar10BenchmarkTests(tf.test.Benchmark):
eval_results
=
stats
[
'eval_results'
]
metrics
=
[]
metrics
.
append
({
'name'
:
'accuracy_top_1'
,
'value'
:
eval_results
[
'accuracy'
].
item
()})
'value'
:
eval_results
[
'accuracy'
].
item
(),
'min_value'
:
MIN_TOP_1_ACCURACY
,
'max_value'
:
MAX_TOP_1_ACCURACY
})
metrics
.
append
({
'name'
:
'accuracy_top_5'
,
'value'
:
eval_results
[
'accuracy_top_5'
].
item
()})
if
examples_per_sec_hook
:
...
...
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