@@ -81,12 +81,12 @@ class Test_TensorFlow_layers : public DNNTestLayer
81
81
{
82
82
public:
83
83
void runTensorFlowNet (const std::string& prefix, bool hasText = false ,
84
- double l1 = 0.0 , double lInf = 0.0 , bool memoryLoad = false )
84
+ double l1 = 0.0 , double lInf = 0.0 , bool memoryLoad = false , const std::string& groupPrefix = " " )
85
85
{
86
- std::string netPath = path (prefix + " _net.pb" );
87
- std::string netConfig = (hasText ? path (prefix + " _net.pbtxt" ) : " " );
86
+ std::string netPath = path (prefix + groupPrefix + " _net.pb" );
87
+ std::string netConfig = (hasText ? path (prefix + groupPrefix + " _net.pbtxt" ) : " " );
88
88
std::string inpPath = path (prefix + " _in.npy" );
89
- std::string outPath = path (prefix + " _out.npy" );
89
+ std::string outPath = path (prefix + groupPrefix + " _out.npy" );
90
90
91
91
cv::Mat input = blobFromNPY (inpPath);
92
92
cv::Mat ref = blobFromNPY (outPath);
@@ -975,10 +975,53 @@ TEST_P(Test_TensorFlow_layers, keras_mobilenet_head)
975
975
runTensorFlowNet (" keras_learning_phase" );
976
976
}
977
977
978
+ // TF case: align_corners=False, half_pixel_centers=False
978
979
TEST_P (Test_TensorFlow_layers, resize_bilinear)
979
980
{
980
981
runTensorFlowNet (" resize_bilinear" );
982
+ }
983
+
984
+ // TF case: align_corners=True, half_pixel_centers=False
985
+ TEST_P (Test_TensorFlow_layers, resize_bilinear_align_corners)
986
+ {
987
+ runTensorFlowNet (" resize_bilinear" ,
988
+ false , 0.0 , 0.0 , false , // default parameters
989
+ " _align_corners" );
990
+ }
991
+
992
+ // TF case: align_corners=False, half_pixel_centers=True
993
+ TEST_P (Test_TensorFlow_layers, resize_bilinear_half_pixel)
994
+ {
995
+ if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH)
996
+ applyTestTag (CV_TEST_TAG_DNN_SKIP_IE_NGRAPH);
997
+
998
+ runTensorFlowNet (" resize_bilinear" , false , 0.0 , 0.0 , false , " _half_pixel" );
999
+ }
1000
+
1001
+ // TF case: align_corners=False, half_pixel_centers=False
1002
+ TEST_P (Test_TensorFlow_layers, resize_bilinear_factor)
1003
+ {
981
1004
runTensorFlowNet (" resize_bilinear_factor" );
1005
+ }
1006
+
1007
+ // TF case: align_corners=False, half_pixel_centers=True
1008
+ TEST_P (Test_TensorFlow_layers, resize_bilinear_factor_half_pixel)
1009
+ {
1010
+ if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH)
1011
+ applyTestTag (CV_TEST_TAG_DNN_SKIP_IE_NGRAPH);
1012
+
1013
+ runTensorFlowNet (" resize_bilinear_factor" , false , 0.0 , 0.0 , false , " _half_pixel" );
1014
+ }
1015
+
1016
+ // TF case: align_corners=True, half_pixel_centers=False
1017
+ TEST_P (Test_TensorFlow_layers, resize_bilinear_factor_align_corners)
1018
+ {
1019
+ runTensorFlowNet (" resize_bilinear_factor" , false , 0.0 , 0.0 , false , " _align_corners" );
1020
+ }
1021
+
1022
+ // TF case: align_corners=False, half_pixel_centers=False
1023
+ TEST_P (Test_TensorFlow_layers, resize_bilinear_down)
1024
+ {
982
1025
runTensorFlowNet (" resize_bilinear_down" );
983
1026
}
984
1027
0 commit comments