Skip to content

Commit

Permalink
Merge pull request opencv#11105 from dkurt:issue_11102
Browse files Browse the repository at this point in the history
  • Loading branch information
alalek committed Mar 21, 2018
2 parents fed22f2 + 069f9ad commit 0366c1b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/dnn/src/layers/lrn_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ class LRNLayerImpl : public LRNLayer
float alpha1 = alpha1_, bias1 = bias1_, beta1 = beta1_;
int k, channels = channels_, ksize = ksize_;

AutoBuffer<float> buf_((channels + ksize*2 + 4)*2);
AutoBuffer<float> buf_((channels + ksize + 1)*2);
float* acc = (float*)buf_;
float* buf = acc + channels + ksize + 1;
for( k = 0; k <= ksize; k++ )
Expand Down
4 changes: 3 additions & 1 deletion modules/dnn/test/test_googlenet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ OCL_TEST(Reproducibility_GoogLeNet, Accuracy)
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)));
Mat inp = Mat(224, 224, CV_8UC3);
randu(inp, -1, 1);
net.setInput(blobFromImage(inp));
net.forward();

std::vector<Mat> inpMats;
Expand Down

0 comments on commit 0366c1b

Please sign in to comment.