mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 07:43:03 +04:00
Merge pull request #15057 from l-bat:fix_vizualizer
* Fix dumpToFile * Add test * Fix test
This commit is contained in:
committed by
Alexander Alekhin
parent
c12e26ff28
commit
12fdaf895e
@@ -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