"git@developer.sourcefind.cn:modelzoo/resnet50_tensorflow.git" did not exist on "9caaba0c4528cd846a847614e816a63d145f6e2c"
Unverified Commit ff5cef9a authored by Toby Boyd's avatar Toby Boyd Committed by GitHub
Browse files

Add top_1 accuracy check. (#6663)

parent 05b9122f
......@@ -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:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment