当前位置: 首页>>代码示例>>C++>>正文


C++ SkipTestException函数代码示例

本文整理汇总了C++中SkipTestException函数的典型用法代码示例。如果您正苦于以下问题:C++ SkipTestException函数的具体用法?C++ SkipTestException怎么用?C++ SkipTestException使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了SkipTestException函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: TEST_P

TEST_P(DNNTestNetwork, MobileNet_SSD_Caffe_Different_Width_Height)
{
    if (backend == DNN_BACKEND_HALIDE)
        throw SkipTestException("");
#if defined(INF_ENGINE_RELEASE)
    if (backend == DNN_BACKEND_INFERENCE_ENGINE && target == DNN_TARGET_MYRIAD
            && getInferenceEngineVPUType() == CV_DNN_INFERENCE_ENGINE_VPU_TYPE_MYRIAD_X)
        throw SkipTestException("Test is disabled for MyriadX");
#endif
    Mat sample = imread(findDataFile("dnn/street.png", false));
    Mat inp = blobFromImage(sample, 1.0f / 127.5, Size(300, 560), Scalar(127.5, 127.5, 127.5), false);
    float diffScores  = (target == DNN_TARGET_OPENCL_FP16 || target == DNN_TARGET_MYRIAD) ? 0.029 : 0.0;
    float diffSquares = (target == DNN_TARGET_OPENCL_FP16 || target == DNN_TARGET_MYRIAD) ? 0.09  : 0.0;
    processNet("dnn/MobileNetSSD_deploy.caffemodel", "dnn/MobileNetSSD_deploy.prototxt",
                inp, "detection_out", "", diffScores, diffSquares);
    expectNoFallbacksFromIE(net);
}
开发者ID:manhhomienbienthuy,项目名称:opencv,代码行数:17,代码来源:test_backends.cpp

示例2: TEST_P

TEST_P(Test_Darknet_layers, shortcut)
{
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_RELEASE < 2018040000
    if (backend == DNN_BACKEND_INFERENCE_ENGINE && target == DNN_TARGET_CPU)
        throw SkipTestException("Test is enabled starts from OpenVINO 2018R4");
#endif
    testDarknetLayer("shortcut");
}
开发者ID:mbbessa,项目名称:opencv,代码行数:8,代码来源:test_darknet_importer.cpp

示例3: PERF_TEST_P_

PERF_TEST_P_(DNNTestNetwork, OpenPose_pose_mpi_faster_4_stages)
{
    if (backend == DNN_BACKEND_HALIDE) throw SkipTestException("");
    // The same .caffemodel but modified .prototxt
    // See https://github.com/CMU-Perceptual-Computing-Lab/openpose/blob/master/src/openpose/pose/poseParameters.cpp
    processNet("dnn/openpose_pose_mpi.caffemodel", "dnn/openpose_pose_mpi_faster_4_stages.prototxt", "",
               Mat(cv::Size(368, 368), CV_32FC3), "", "caffe");
}
开发者ID:Aspie96,项目名称:opencv,代码行数:8,代码来源:perf_net.cpp

示例4: SkipTestException

void TestExcelAttachedDocument::TestSave()
{
	if (isPASubstDrive())	// CH 12/10/07
	{
		throw SkipTestException(_T("Excel 'Save' does not work on a 'subst'ed P: drive - Test skipped"));
	}
	throw SkipTestException(_T("TODO: Find out why Save sometimes fails (output document open by someone else)"));

	Excel::_WorkbookPtr spWorkbook(m_spAttachedDocument);
	assertMessage(VARIANT_TRUE == spWorkbook->Saved, _T("Expected the workbook to be saved"));
	spWorkbook->Worksheets->Add();
	assertMessage(VARIANT_FALSE == spWorkbook->Saved, _T("Expected the workbook to be unsaved after modification"));

	m_pDocument->Save();

	assertMessage(VARIANT_TRUE == spWorkbook->Saved, _T("Expected the workbook to be saved after a call to save"));
}
开发者ID:killbug2004,项目名称:WSProf,代码行数:17,代码来源:TestExcelAttachedDocument.cpp

示例5: TEST_P

TEST_P(Test_TensorFlow_layers, unfused_flatten)
{
    if (backend == DNN_BACKEND_INFERENCE_ENGINE &&
        (target == DNN_TARGET_OPENCL || target == DNN_TARGET_OPENCL_FP16))
        throw SkipTestException("");
    runTensorFlowNet("unfused_flatten");
    runTensorFlowNet("unfused_flatten_unknown_batch");
}
开发者ID:AliMiraftab,项目名称:opencv,代码行数:8,代码来源:test_tf_importer.cpp

示例6: TEST_P

TEST_P(DNNTestNetwork, SSD_VGG16)
{
    if (backend == DNN_BACKEND_DEFAULT && target == DNN_TARGET_OPENCL ||
        backend == DNN_BACKEND_HALIDE && target == DNN_TARGET_CPU)
        throw SkipTestException("");
    processNet("dnn/VGG_ILSVRC2016_SSD_300x300_iter_440000.caffemodel",
               "dnn/ssd_vgg16.prototxt", Size(300, 300), "detection_out", "caffe");
}
开发者ID:FlyingCatAlex,项目名称:opencv,代码行数:8,代码来源:test_backends.cpp

示例7: TEST_P

TEST_P(Test_Torch_layers, net_conv_gemm_lrn)
{
    if (backend == DNN_BACKEND_INFERENCE_ENGINE && target == DNN_TARGET_MYRIAD)
        throw SkipTestException("");
    runTorchNet("net_conv_gemm_lrn", "", false, true,
                target == DNN_TARGET_OPENCL_FP16 ? 0.046 : 0.0,
                target == DNN_TARGET_OPENCL_FP16 ? 0.023 : 0.0);
}
开发者ID:Kumataro,项目名称:opencv,代码行数:8,代码来源:test_torch_importer.cpp

示例8: TEST_P

TEST_P(Test_ONNX_nets, Inception_v1)
{
#if defined(INF_ENGINE_RELEASE)
    if (backend == DNN_BACKEND_INFERENCE_ENGINE && target == DNN_TARGET_MYRIAD)
        throw SkipTestException("Test is disabled for Myriad targets");
#endif
    testONNXModels("inception_v1", pb);
}
开发者ID:philippefoubert,项目名称:opencv,代码行数:8,代码来源:test_onnx_importer.cpp

示例9: SkipTestException

void TestFacadeDocumentProvider::TestAreTheseDifferentVersionsOfTheSameDocument()
{
	throw SkipTestException(_T("Oh No!! Queryinterface doesn't work!!! Still under investigation!!!"));
	//IWSDocumentProvider7Ptr spProvider;
	//HRESULT hr = spProvider.CreateInstance("Workshare.FacadeDocumentProvider");
	//assertMessage(FAILED(hr), "Failed to instantiate the \"Workshare.FacadeDocumentProvider\"");
	//VARIANT_BOOL result;
	//assertMessage(E_NOTIMPL == spProvider->raw_AreTheseDifferentVersionsOfTheSameDocument(L"", L"", &result), "Expect E_NOT_IMPL to be returned");
}
开发者ID:killbug2004,项目名称:WSProf,代码行数:9,代码来源:TestFacadeDocumentProvider.cpp

示例10: TEST_P

TEST_P(Test_Torch_layers, net_residual)
{
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_RELEASE == 2018050000
    if (backend == DNN_BACKEND_INFERENCE_ENGINE && (target == DNN_TARGET_OPENCL ||
                                                    target == DNN_TARGET_OPENCL_FP16))
        throw SkipTestException("Test is disabled for OpenVINO 2018R5");
#endif
    runTorchNet("net_residual", "", false, true);
}
开发者ID:adamrankin,项目名称:opencv,代码行数:9,代码来源:test_torch_importer.cpp

示例11: TEST_P

TEST_P(InterpolatorTest, MultiThreadReproducibility)
{
    if (cv::getNumberOfCPUs() == 1)
        return;

    double MAX_DIF = 1.0;
    double MAX_MEAN_DIF = 1.0 / 256.0;
    int loopsCount = 2;
    RNG rng(0);

    InterpolatorParams params = GetParam();
    Size size       = get<0>(params);
    int guideType   = get<1>(params);

    Mat from(size, guideType);
    randu(from, 0, 255);

    int num_matches = rng.uniform(5,SHRT_MAX-1);
    vector<Point2f> from_points;
    vector<Point2f> to_points;

    for(int i=0;i<num_matches;i++)
    {
        from_points.push_back(Point2f(rng.uniform(0.01f,(float)size.width-1.01f),rng.uniform(0.01f,(float)size.height-1.01f)));
        to_points.push_back(Point2f(rng.uniform(0.01f,(float)size.width-1.01f),rng.uniform(0.01f,(float)size.height-1.01f)));
    }

    int nThreads = cv::getNumThreads();
    if (nThreads == 1)
        throw SkipTestException("Single thread environment");
    for (int iter = 0; iter <= loopsCount; iter++)
    {
        int K = rng.uniform(4,512);
        float sigma = rng.uniform(0.01f,0.5f);
        float FGSlambda = rng.uniform(100.0f, 10000.0f);
        float FGSsigma  = rng.uniform(0.5f, 100.0f);

        Ptr<EdgeAwareInterpolator> interpolator = createEdgeAwareInterpolator();
        interpolator->setK(K);
        interpolator->setSigma(sigma);
        interpolator->setUsePostProcessing(true);
        interpolator->setFGSLambda(FGSlambda);
        interpolator->setFGSSigma(FGSsigma);

        cv::setNumThreads(nThreads);
        Mat resMultiThread;
        interpolator->interpolate(from,from_points,Mat(),to_points,resMultiThread);

        cv::setNumThreads(1);
        Mat resSingleThread;
        interpolator->interpolate(from,from_points,Mat(),to_points,resSingleThread);

        EXPECT_LE(cv::norm(resSingleThread, resMultiThread, NORM_INF), MAX_DIF);
        EXPECT_LE(cv::norm(resSingleThread, resMultiThread, NORM_L1) , MAX_MEAN_DIF*resMultiThread.total());
    }
}
开发者ID:Bleach665,项目名称:opencv_contrib,代码行数:56,代码来源:test_sparse_match_interpolator.cpp


注:本文中的SkipTestException函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。