mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-30 20:18:08 +00:00
skip the check for A channel (#5989)
This commit is contained in:
parent
cdacee6696
commit
b4e6cc59c7
2 changed files with 4 additions and 1 deletions
|
|
@ -274,6 +274,8 @@ namespace ImageTestHelper {
|
|||
// So we use error rate.
|
||||
UINT errors = 0;
|
||||
for (uint32_t i = 0; i < size; i++, pActualByte++, pExpectedByte++) {
|
||||
// Only the check the first three channels, which are (B, G, R)
|
||||
if((i + 1) % 4 == 0) continue;
|
||||
auto diff = (*pActualByte - *pExpectedByte);
|
||||
if (diff > epsilon) {
|
||||
errors++;
|
||||
|
|
|
|||
|
|
@ -768,9 +768,10 @@ bool VerifyHelper(ImageFeatureValue actual, ImageFeatureValue expected) {
|
|||
// hard code, might need to be modified later.
|
||||
const float cMaxErrorRate = 0.06f;
|
||||
byte epsilon = 20;
|
||||
|
||||
UINT errors = 0;
|
||||
for (uint32_t i = 0; i < size; i++, pActualByte++, pExpectedByte++) {
|
||||
// Only the check the first three channels, which are (B, G, R)
|
||||
if((i + 1) % 4 == 0) continue;
|
||||
auto diff = std::abs(*pActualByte - *pExpectedByte);
|
||||
if (diff > epsilon) {
|
||||
errors++;
|
||||
|
|
|
|||
Loading…
Reference in a new issue