1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 08:13:04 +04:00

Reset OpenCL kernels if batch size changes

This commit is contained in:
Dmitry Kurtaev
2018-03-07 16:56:41 +03:00
parent 0a61ebdd66
commit 0f01b40dd5
6 changed files with 34 additions and 8 deletions
+4
View File
@@ -77,6 +77,10 @@ OCL_TEST(Reproducibility_GoogLeNet, Accuracy)
net.setPreferableBackend(DNN_BACKEND_DEFAULT);
net.setPreferableTarget(DNN_TARGET_OPENCL);
// Initialize network for a single image in the batch but test with batch size=2.
net.setInput(blobFromImage(Mat(224, 224, CV_8UC3)));
net.forward();
std::vector<Mat> inpMats;
inpMats.push_back( imread(_tf("googlenet_0.png")) );
inpMats.push_back( imread(_tf("googlenet_1.png")) );