resize tensor on reuse if required

pull/16648/head
YashasSamaga 5 years ago
parent 8eafddf211
commit 5e082ab852
  1. 4
      modules/dnn/src/op_cuda.hpp

@ -305,6 +305,10 @@ namespace cv { namespace dnn {
shape = shape_;
offset = 0;
shared_block = base->shared_block;
auto numel = total(shape_);
if (numel > shared_block->device.size())
shared_block->device.reset(numel);
}
static Ptr<BackendWrapper> create(Mat& m) {

Loading…
Cancel
Save