Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Decreases test sensitivity (#15014)
Browse files Browse the repository at this point in the history
  • Loading branch information
perdasilva authored and wkcn committed May 24, 2019
1 parent eade26f commit 5763ba9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/python/tensorrt/test_tensorrt_lenet5.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,11 @@ def test_tensorrt_inference():
print("MXNet accuracy: %f" % mx_pct)
print("MXNet-TensorRT accuracy: %f" % trt_pct)

assert abs(mx_pct - trt_pct) < 1e-2, \
"""Diff. between MXNet & TensorRT accuracy too high:
MXNet = %f, TensorRT = %f""" % (mx_pct, trt_pct)
absolute_accuracy_diff = abs(mx_pct - trt_pct)
epsilon = 1.01e-2
assert absolute_accuracy_diff < epsilon, \
"""Absolute diff. between MXNet & TensorRT accuracy (%f) exceeds threshold (%f):
MXNet = %f, TensorRT = %f""" % (absolute_accuracy_diff, epsilon, mx_pct, trt_pct)


if __name__ == '__main__':
Expand Down

0 comments on commit 5763ba9

Please sign in to comment.