Try to fix sporadic sum layer test fail (#15304)

This commit is contained in:
Maxim Vafin 2023-01-26 13:08:30 +01:00 committed by GitHub
parent 033368caab
commit 84a4e3bbf4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -9,7 +9,8 @@ from pytorch_layer_test_class import PytorchLayerTest
class TestSum(PytorchLayerTest):
def _prepare_input(self):
import numpy as np
return (np.random.randn(1, 3, 224, 224).astype(np.float32),)
# This test had sporadically failed by accuracy. Try to resolve that by using int numbers in input
return (np.random.randint(-10, 10, (1, 3, 224, 224)).astype(np.float32),)
def create_model(self, axes, keep_dims):
@ -37,4 +38,5 @@ class TestSum(PytorchLayerTest):
@pytest.mark.nightly
@pytest.mark.precommit
def test_sum(self, axes, keep_dim, ie_device, precision, ir_version):
self._test(*self.create_model(axes, keep_dim), ie_device, precision, ir_version)
self._test(*self.create_model(axes, keep_dim),
ie_device, precision, ir_version)