TEST_P(Test_Torch_layers, net_padding) { int targetId = GetParam(); runTorchNet("net_padding", targetId, "", false, true); runTorchNet("net_spatial_zero_padding", targetId, "", false, true); runTorchNet("net_spatial_reflection_padding", targetId, "", false, true); }
TEST_P(Test_Torch_layers, run_reshape) { int targetId = GetParam(); runTorchNet("net_reshape", targetId); runTorchNet("net_reshape_batch", targetId); runTorchNet("net_reshape_single_sample", targetId); runTorchNet("net_reshape_channels", targetId, "", false, true); }
TEST_P(Test_Torch_layers, run_reshape) { #if defined(INF_ENGINE_RELEASE) && INF_ENGINE_RELEASE == 2018040000 if (backend == DNN_BACKEND_INFERENCE_ENGINE && target == DNN_TARGET_MYRIAD) throw SkipTestException("Test is disabled for OpenVINO 2018R4"); #endif runTorchNet("net_reshape_batch"); runTorchNet("net_reshape_channels", "", false, true); }
TEST_P(Test_Torch_layers, run_convolution) { // Output reference values are in range [23.4018, 72.0181] double l1 = (target == DNN_TARGET_OPENCL_FP16 || target == DNN_TARGET_MYRIAD) ? 0.08 : default_l1; double lInf = (target == DNN_TARGET_OPENCL_FP16 || target == DNN_TARGET_MYRIAD) ? 0.42 : default_lInf; runTorchNet("net_conv", "", false, true, l1, lInf); }
TEST_P(Test_Torch_layers, run_reshape_single_sample) { // Reference output values in range [14.4586, 18.4492]. runTorchNet("net_reshape_single_sample", "", false, false, (target == DNN_TARGET_MYRIAD || target == DNN_TARGET_OPENCL_FP16) ? 0.0073 : default_l1, (target == DNN_TARGET_MYRIAD || target == DNN_TARGET_OPENCL_FP16) ? 0.025 : default_lInf); }
TEST_P(Test_Torch_layers, net_non_spatial) { if (backend == DNN_BACKEND_INFERENCE_ENGINE && (target == DNN_TARGET_OPENCL || target == DNN_TARGET_OPENCL_FP16)) throw SkipTestException(""); runTorchNet("net_non_spatial", "", false, true); }
TEST_P(Test_Torch_layers, run_deconv) { #if defined(INF_ENGINE_RELEASE) && INF_ENGINE_RELEASE == 2018040000 if (backend == DNN_BACKEND_INFERENCE_ENGINE && target == DNN_TARGET_MYRIAD) throw SkipTestException("Test is disabled for OpenVINO 2018R4"); #endif runTorchNet("net_deconv"); }
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); }
TEST_P(Test_Torch_layers, net_inception_block) { #if defined(INF_ENGINE_RELEASE) && INF_ENGINE_RELEASE == 2018030000 if (backend == DNN_BACKEND_INFERENCE_ENGINE && target == DNN_TARGET_MYRIAD) throw SkipTestException(""); #endif runTorchNet("net_inception_block", "", false, true); }
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); }
TEST_P(Test_Torch_layers, net_normalize) { runTorchNet("net_normalize", "", false, true); }
TEST_P(Test_Torch_layers, net_non_spatial) { runTorchNet("net_non_spatial", GetParam(), "", false, true); }
TEST_P(Test_Torch_layers, net_inception_block) { runTorchNet("net_inception_block", GetParam(), "", false, true); }
TEST_P(Test_Torch_layers, net_logsoftmax) { runTorchNet("net_logsoftmax"); runTorchNet("net_logsoftmax_spatial"); }
TEST_P(Test_Torch_layers, net_lp_pooling) { runTorchNet("net_lp_pooling_square", "", false, true); runTorchNet("net_lp_pooling_power", "", false, true); }
TEST_P(Test_Torch_layers, run_reshape_change_batch_size) { runTorchNet("net_reshape"); }
TEST_P(Test_Torch_layers, net_cadd_table) { runTorchNet("net_cadd_table"); }
// TODO: fix OpenCL and add to the rest of tests TEST(Torch_Importer, run_paralel) { runTorchNet("net_parallel", DNN_TARGET_CPU, "l5_torchMerge"); }
TEST_P(Test_Torch_layers, run_batch_norm) { runTorchNet("net_batch_norm", "", false, true); }
TEST(Torch_Importer, DISABLED_run_paralel) { runTorchNet("net_parallel", DNN_TARGET_OPENCL, "l5_torchMerge"); }
TEST_P(Test_Torch_layers, run_depth_concat) { runTorchNet("net_depth_concat", "", false, true, 0.0, target == DNN_TARGET_OPENCL_FP16 ? 0.021 : 0.0); }
TEST_P(Test_Torch_layers, run_paralel) { if (backend != DNN_BACKEND_OPENCV || target != DNN_TARGET_CPU) throw SkipTestException(""); runTorchNet("net_parallel", "l5_torchMerge"); }
TEST(Torch_Importer, net_residual) { runTorchNet("net_residual", DNN_TARGET_CPU, "", false, true); }
TEST_P(Test_Torch_layers, run_pool_max) { if (backend == DNN_BACKEND_OPENCV && target == DNN_TARGET_OPENCL_FP16) throw SkipTestException(""); runTorchNet("net_pool_max", "", true); }
TEST_P(Test_Torch_layers, net_padding) { runTorchNet("net_padding", "", false, true); runTorchNet("net_spatial_zero_padding", "", false, true); runTorchNet("net_spatial_reflection_padding", "", false, true); }
TEST_P(Test_Torch_layers, net_prelu) { runTorchNet("net_prelu"); }
TEST_P(Test_Torch_layers, run_linear) { if (backend == DNN_BACKEND_OPENCV && target == DNN_TARGET_OPENCL_FP16) throw SkipTestException(""); runTorchNet("net_linear_2d"); }
TEST_P(Test_Torch_layers, run_pool_ave) { runTorchNet("net_pool_ave"); }
TEST_P(Test_Torch_layers, net_residual) { runTorchNet("net_residual", "", false, true); }
TEST_P(Test_Torch_layers, run_concat) { runTorchNet("net_concat", "l5_torchMerge"); }