mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-11 17:48:34 +00:00
Create derived class from onnx BackendTest so we can use the same tolerance values as in onnx_test_runner. Enable GRU test that was failing. (#584)
This commit is contained in:
parent
b742c3a965
commit
fb6f091073
1 changed files with 12 additions and 2 deletions
|
|
@ -10,12 +10,22 @@ import onnxruntime.backend as c2
|
|||
|
||||
pytest_plugins = 'onnx.backend.test.report',
|
||||
|
||||
backend_test = onnx.backend.test.BackendTest(c2, __name__)
|
||||
class OrtBackendTest(onnx.backend.test.BackendTest):
|
||||
|
||||
def __init__(self, backend, parent_module=None):
|
||||
super(OrtBackendTest, self).__init__(backend, parent_module)
|
||||
|
||||
@classmethod
|
||||
def assert_similar_outputs(cls, ref_outputs, outputs, rtol, atol):
|
||||
# type: (Sequence[Any], Sequence[Any], float, float) -> None
|
||||
|
||||
# override the rtol and atol values to match onnx_test_runner tolerances
|
||||
super(OrtBackendTest, cls).assert_similar_outputs(ref_outputs, outputs, 1e-3, 1e-5)
|
||||
|
||||
backend_test = OrtBackendTest(c2, __name__)
|
||||
|
||||
# Type not supported
|
||||
backend_test.exclude(r'(FLOAT16)')
|
||||
backend_test.exclude(r'^test_gru_seq_length_cpu.*')
|
||||
|
||||
backend_test.exclude(r'('
|
||||
'^test_cast_DOUBLE_to_FLOAT_cpu.*'
|
||||
|
|
|
|||
Loading…
Reference in a new issue