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

[Flaky Test] Fixes flaky TensorRT Test #15014

Merged
merged 1 commit into from
May 24, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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