1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 15:53:03 +04:00

Merge pull request #20702 from zihaomu:tf_expand_dim_layer

Add ExpandDims layer of tf_importer.cpp

* Add ExpandDims to tf_importer.

* add -1 expand test case.

* Support different dimensions of input.

* Compatible with 5-dimensional NDHWC data

* Code align

* support 3-dim input.

* 3-dim bug fixed.

* fixing error of code format.
This commit is contained in:
Zihao Mu
2021-10-05 00:37:38 +08:00
committed by GitHub
parent 59502594f8
commit 9085b933d8
2 changed files with 144 additions and 3 deletions
+13
View File
@@ -593,6 +593,19 @@ TEST_P(Test_TensorFlow_layers, BiasAdd)
runTensorFlowNet("bias_add_1");
}
TEST_P(Test_TensorFlow_layers, ExpandDims)
{
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_GE(2019010000)
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019 && target == DNN_TARGET_MYRIAD
&& getInferenceEngineVPUType() == CV_DNN_INFERENCE_ENGINE_VPU_TYPE_MYRIAD_X
)
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_MYRIAD_X, CV_TEST_TAG_DNN_SKIP_IE_NN_BUILDER, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
#endif
runTensorFlowNet("expand_dims_1");
runTensorFlowNet("expand_dims_2");
}
// TODO: fix it and add to l2_normalize
TEST_P(Test_TensorFlow_layers, l2_normalize_3d)
{