Merge remote-tracking branch 'upstream/3.4' into merge-3.4
This commit is contained in:
@@ -78,6 +78,26 @@ TEST(readNet, Regression)
|
||||
EXPECT_FALSE(net.empty());
|
||||
}
|
||||
|
||||
typedef testing::TestWithParam<tuple<Backend, Target> > dump;
|
||||
TEST_P(dump, Regression)
|
||||
{
|
||||
const int backend = get<0>(GetParam());
|
||||
const int target = get<1>(GetParam());
|
||||
Net net = readNet(findDataFile("dnn/squeezenet_v1.1.prototxt"),
|
||||
findDataFile("dnn/squeezenet_v1.1.caffemodel", false));
|
||||
|
||||
int size[] = {1, 3, 227, 227};
|
||||
Mat input = cv::Mat::ones(4, size, CV_32F);
|
||||
net.setInput(input);
|
||||
net.setPreferableBackend(backend);
|
||||
net.setPreferableTarget(target);
|
||||
EXPECT_FALSE(net.dump().empty());
|
||||
net.forward();
|
||||
EXPECT_FALSE(net.dump().empty());
|
||||
}
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(/**/, dump, dnnBackendsAndTargets());
|
||||
|
||||
class FirstCustomLayer CV_FINAL : public Layer
|
||||
{
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user