mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 06:03:15 +08:00
Merge pull request #12502 from alalek:fix_dnn_tests_32bit
This commit is contained in:
commit
e51d7cb3d8
@ -210,7 +210,11 @@ TEST_P(Test_ONNX_nets, RCNN_ILSVRC13)
|
||||
testONNXModels("rcnn_ilsvrc13", pb);
|
||||
}
|
||||
|
||||
#ifdef OPENCV_32BIT_CONFIGURATION
|
||||
TEST_P(Test_ONNX_nets, DISABLED_VGG16) // memory usage >2Gb
|
||||
#else
|
||||
TEST_P(Test_ONNX_nets, VGG16)
|
||||
#endif
|
||||
{
|
||||
double l1 = default_l1;
|
||||
double lInf = default_lInf;
|
||||
@ -225,7 +229,11 @@ TEST_P(Test_ONNX_nets, VGG16)
|
||||
testONNXModels("vgg16", pb, l1, lInf);
|
||||
}
|
||||
|
||||
#ifdef OPENCV_32BIT_CONFIGURATION
|
||||
TEST_P(Test_ONNX_nets, DISABLED_VGG16_bn) // memory usage >2Gb
|
||||
#else
|
||||
TEST_P(Test_ONNX_nets, VGG16_bn)
|
||||
#endif
|
||||
{
|
||||
double l1 = default_l1;
|
||||
double lInf = default_lInf;
|
||||
@ -288,7 +296,7 @@ TEST_P(Test_ONNX_nets, CNN_MNIST)
|
||||
{
|
||||
// output range: [-1952; 6574]
|
||||
const double l1 = (target == DNN_TARGET_OPENCL_FP16 || target == DNN_TARGET_MYRIAD) ? 3.82 : 4.3e-4;
|
||||
const double lInf = (target == DNN_TARGET_OPENCL_FP16 || target == DNN_TARGET_MYRIAD) ? 13.5 : 1e-3;
|
||||
const double lInf = (target == DNN_TARGET_OPENCL_FP16 || target == DNN_TARGET_MYRIAD) ? 13.5 : 2e-3;
|
||||
|
||||
testONNXModels("cnn_mnist", pb, l1, lInf);
|
||||
}
|
||||
|
@ -37,6 +37,18 @@
|
||||
#include <algorithm>
|
||||
|
||||
|
||||
#ifndef OPENCV_32BIT_CONFIGURATION
|
||||
# if defined(INTPTR_MAX) && defined(INT32_MAX) && INTPTR_MAX == INT32_MAX
|
||||
# define OPENCV_32BIT_CONFIGURATION 1
|
||||
# elif defined(_WIN32) && !defined(_WIN64)
|
||||
# define OPENCV_32BIT_CONFIGURATION 1
|
||||
# endif
|
||||
#else
|
||||
# if OPENCV_32BIT_CONFIGURATION == 0
|
||||
# undef OPENCV_32BIT_CONFIGURATION
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef WINRT
|
||||
#pragma warning(disable:4447) // Disable warning 'main' signature found without threading model
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user