Changed fw_eps for test_conv_5D_precommit tests (#14573)
* changed fw_eps for test_conv_5D_precommit tests * fixed cases with changing fw_eps for test_conv_5D_precommit tests Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
This commit is contained in:
@@ -112,13 +112,14 @@ class CommonLayerTest:
|
||||
if 'custom_eps' in kwargs and kwargs['custom_eps'] is not None:
|
||||
custom_eps = kwargs['custom_eps']
|
||||
else:
|
||||
custom_eps = 1e-4
|
||||
|
||||
if precision == 'FP32':
|
||||
custom_eps = 1e-4
|
||||
else:
|
||||
custom_eps = 5e-2
|
||||
# Compare Ie results with Framework results
|
||||
fw_eps = custom_eps if precision == 'FP32' else 5e-2
|
||||
assert self.compare_ie_results_with_framework(infer_res=infer_res, framework_res=fw_res,
|
||||
mapping_dict=mapping_dict,
|
||||
framework_eps=fw_eps), \
|
||||
framework_eps=custom_eps), \
|
||||
"Comparing with Framework failed: ie_res={}; framework_res={}.".format(infer_res,
|
||||
fw_res)
|
||||
|
||||
|
||||
@@ -477,11 +477,12 @@ class TestConv(OnnxRuntimeLayerTest):
|
||||
@pytest.mark.precommit
|
||||
def test_conv_5D_precommit(self, params, dilations, pads, strides, bias, ie_device, precision,
|
||||
ir_version, temp_dir, use_old_api):
|
||||
custom_eps_value = 1e-1 if ie_device == 'GPU' and precision == 'FP16' else None
|
||||
self._test(
|
||||
*self.create_net(**params, shape=[2, 3, 25, 25, 25], dilations=dilations, pads=pads,
|
||||
strides=strides,
|
||||
bias=bias, ir_version=ir_version),
|
||||
ie_device, precision, ir_version, temp_dir=temp_dir, use_old_api=use_old_api)
|
||||
ie_device, precision, ir_version, temp_dir=temp_dir, use_old_api=use_old_api, custom_eps=custom_eps_value)
|
||||
|
||||
@pytest.mark.parametrize("params", test_data_5D)
|
||||
@pytest.mark.parametrize("dilations", [[1, 1, 1], [2, 2, 2], [3, 4, 5]])
|
||||
|
||||
Reference in New Issue
Block a user