0
0
mirror of https://github.com/opencv/opencv.git synced 2026-01-18 17:21:42 +01:00

Merge pull request #28026 from harunresit:fix-27966-torch

Unnecessary copy of Mat object is fixed in TorchImporter
This commit is contained in:
Alexander Smorkalov
2025-11-17 10:54:51 +03:00
committed by GitHub

View File

@@ -598,7 +598,7 @@ struct TorchImporter
readTorchTable(scalarParams, tensorParams);
CV_Assert(tensorParams.count("weight"));
Mat weightBlob = tensorParams["weight"].second;
const Mat& weightBlob = tensorParams["weight"].second;
layerParams.blobs.push_back(weightBlob);
bool bias = tensorParams.count("bias") != 0;