ermig1979 / Simd

C++ image processing and machine learning library with using of SIMD: SSE, AVX, AVX-512, AMX for x86/x64, NEON for ARM.
http://ermig1979.github.io/Simd
MIT License
2.06k stars 412 forks source link

SynetConvolution8iForwardAutoTest failed #144

Closed teor292 closed 3 years ago

teor292 commented 3 years ago

Hi again :) It is a very strange behaviour. I run tests in Release x64 mode (vs 2019, 16.9.2) and get failed test. Here result:

[2196] INFO: SynetConvolution8iForwardAutoTest is started : [2196] INFO: Test [Simd::Base::SynetConvolution8iInit[1x224x12x12-224x3x3-1-1-1-1-pr-n] & SimdSynetConvolution8iInit[1x224x12x12-224x3x3-1-1-1-1-pr-n]]. [2196] INFO: Test [Simd::Base::SynetConvolution8iInit[1x224x12x14-224x3x3-1-1-1-1-pr-n] & SimdSynetConvolution8iInit[1x224x12x14-224x3x3-1-1-1-1-pr-n]]. [2196] INFO: Test [Simd::Base::SynetConvolution8iInit[1x112x24x24-112x3x3-1-1-1-1-pr-n] & SimdSynetConvolution8iInit[1x112x24x24-112x3x3-1-1-1-1-pr-n]]. [2196] INFO: Test [Simd::Base::SynetConvolution8iInit[1x112x24x26-112x3x3-1-1-1-1-pr-n] & SimdSynetConvolution8iInit[1x112x24x26-112x3x3-1-1-1-1-pr-n]]. [2196] INFO: Test [Simd::Sse41::SynetConvolution8iInit[1x224x12x12-224x3x3-1-1-1-1-pr-n] & SimdSynetConvolution8iInit[1x224x12x12-224x3x3-1-1-1-1-pr-n]]. [2196] INFO: Test [Simd::Sse41::SynetConvolution8iInit[1x224x12x14-224x3x3-1-1-1-1-pr-n] & SimdSynetConvolution8iInit[1x224x12x14-224x3x3-1-1-1-1-pr-n]]. [2196] INFO: Test [Simd::Sse41::SynetConvolution8iInit[1x112x24x24-112x3x3-1-1-1-1-pr-n] & SimdSynetConvolution8iInit[1x112x24x24-112x3x3-1-1-1-1-pr-n]]. [2196] ERROR: Fail comparison: Error at [0, 1, 3, 73] : 102 != 101; (difference = 1)!`

But, if run only this test -> everything is OK. If run from start-> test failed again and again. If run from, for example, middle of tests (100 number in group) -> OK again. Unfortunately, I don't know the reason of this. Thanks.

ermig1979 commented 3 years ago

The main reason - is rounding of float to int. Result depends from random filling of input image.

ermig1979 commented 3 years ago

Anyway I fixed this bug in order to confuse nobody.