mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 15:53:03 +04:00
java warning fix
This commit is contained in:
@@ -1196,7 +1196,18 @@ void Net::Impl::forward(std::vector<std::vector<Mat>>& outputBlobs,
|
||||
FPDenormalsIgnoreHintScope fp_denormals_ignore_scope;
|
||||
|
||||
if (mainGraph)
|
||||
CV_Error(Error::StsNotImplemented, "The new dnn engine doesn't support inference until a specified layer. If you want to run the whole model, please don't set the outputName argument in the forward() call. If you want to run the model until a specified layer, please use the old dnn engine");
|
||||
{
|
||||
// In the new engine every requested name maps to a single graph output tensor,
|
||||
// so each nested list holds exactly one blob.
|
||||
std::vector<std::string> names(outBlobNames.begin(), outBlobNames.end());
|
||||
std::vector<Mat> flat;
|
||||
forwardWithMultipleOutputs(flat, names);
|
||||
CV_Assert(flat.size() == outBlobNames.size());
|
||||
outputBlobs.resize(outBlobNames.size());
|
||||
for (size_t i = 0; i < outBlobNames.size(); i++)
|
||||
outputBlobs[i].assign(1, flat[i]);
|
||||
return;
|
||||
}
|
||||
|
||||
std::vector<LayerPin> pins;
|
||||
for (int i = 0; i < outBlobNames.size(); i++)
|
||||
|
||||
Reference in New Issue
Block a user