1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

resize tensor on reuse if required

This commit is contained in:
YashasSamaga
2020-02-24 10:45:59 +05:30
parent 8eafddf211
commit 5e082ab852
+4
View File
@@ -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) {