Unverified Commit db9f4436 authored by Alexander Alekhin's avatar Alexander Alekhin Committed by GitHub

Merge pull request #16473 from ashishkrshrivastava:opencvtf

parents eb14f9a4 cd53144e
...@@ -1468,6 +1468,8 @@ void TFImporter::populateNet(Net dstNet) ...@@ -1468,6 +1468,8 @@ void TFImporter::populateNet(Net dstNet)
int end_mask = getLayerAttr(layer, "end_mask").i(); int end_mask = getLayerAttr(layer, "end_mask").i();
for (int i = 0; i < num; ++i) for (int i = 0; i < num; ++i)
{ {
if (ends.at<int>(i) < 0)
ends.at<int>(i) -= 1;
if (end_mask & (1 << i)) if (end_mask & (1 << i))
ends.at<int>(i) = -1; ends.at<int>(i) = -1;
if (strides.at<int>(i) != 1) if (strides.at<int>(i) != 1)
......
...@@ -808,6 +808,8 @@ TEST_P(Test_TensorFlow_layers, slice) ...@@ -808,6 +808,8 @@ TEST_P(Test_TensorFlow_layers, slice)
(target == DNN_TARGET_OPENCL || target == DNN_TARGET_OPENCL_FP16)) (target == DNN_TARGET_OPENCL || target == DNN_TARGET_OPENCL_FP16))
applyTestTag(target == DNN_TARGET_OPENCL ? CV_TEST_TAG_DNN_SKIP_IE_OPENCL : CV_TEST_TAG_DNN_SKIP_IE_OPENCL_FP16, applyTestTag(target == DNN_TARGET_OPENCL ? CV_TEST_TAG_DNN_SKIP_IE_OPENCL : CV_TEST_TAG_DNN_SKIP_IE_OPENCL_FP16,
CV_TEST_TAG_DNN_SKIP_IE_NN_BUILDER); CV_TEST_TAG_DNN_SKIP_IE_NN_BUILDER);
double l1 = target == DNN_TARGET_MYRIAD ? 4.9e-3 : default_l1;
runTensorFlowNet("crop2d", false, l1);
runTensorFlowNet("slice_4d"); runTensorFlowNet("slice_4d");
runTensorFlowNet("strided_slice"); runTensorFlowNet("strided_slice");
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment