mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 07:43:03 +04:00
Merge pull request #11835 from dkurt:dnn_tf_two_inputs
This commit is contained in:
@@ -441,4 +441,20 @@ TEST(Test_TensorFlow, resize_bilinear)
|
||||
runTensorFlowNet("resize_bilinear_factor");
|
||||
}
|
||||
|
||||
TEST(Test_TensorFlow, two_inputs)
|
||||
{
|
||||
Net net = readNet(path("two_inputs_net.pbtxt"));
|
||||
net.setPreferableBackend(DNN_BACKEND_OPENCV);
|
||||
|
||||
Mat firstInput(2, 3, CV_32FC1), secondInput(2, 3, CV_32FC1);
|
||||
randu(firstInput, -1, 1);
|
||||
randu(secondInput, -1, 1);
|
||||
|
||||
net.setInput(firstInput, "first_input");
|
||||
net.setInput(secondInput, "second_input");
|
||||
Mat out = net.forward();
|
||||
|
||||
normAssert(out, firstInput + secondInput);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user