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:
@@ -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")) );
|
||||
|
||||
Reference in New Issue
Block a user