Added reshape corrections
authorAnastasia Murzova <anastasia.murzova@xperience.ai>
Tue, 23 Mar 2021 19:28:26 +0000 (22:28 +0300)
committerAnastasia Murzova <anastasia.murzova@xperience.ai>
Wed, 24 Mar 2021 07:53:11 +0000 (10:53 +0300)
modules/dnn/src/tensorflow/tf_importer.cpp
modules/dnn/test/test_tf_importer.cpp

index bdab066..a0fcfff 100644 (file)
@@ -306,7 +306,7 @@ bool hasAllOnes(const Mat &inputs, int startPos, int endPos)
 
     for (int i = startPos; i < endPos; i++)
     {
-        if (inputs.at<int>(i) != 1 || inputs.at<int>(i)!= -1)
+        if (inputs.at<int>(i) != 1 && inputs.at<int>(i) != -1)
             return false;
     }
     return true;
index 5e45a5c..cbf2c60 100644 (file)
@@ -478,6 +478,11 @@ TEST_P(Test_TensorFlow_layers, reshape_nchw)
     runTensorFlowNet("reshape_nchw");
 }
 
+TEST_P(Test_TensorFlow_layers, reshape_conv)
+{
+    runTensorFlowNet("reshape_conv");
+}
+
 TEST_P(Test_TensorFlow_layers, leaky_relu)
 {
 #if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2018050000)