mirror of
https://github.com/opencv/opencv.git
synced 2025-08-05 22:19:14 +08:00
dnn(test): fix outputs handling in ONNX conformance
- ONNX output is 1 tensor per defined output instead of N tensors from outputs of "output" layer
This commit is contained in:
parent
85719a0a5d
commit
a7e6a1059c
@ -1171,10 +1171,10 @@ TEST_P(Test_ONNX_conformance, Layer_Test)
|
||||
}
|
||||
|
||||
std::vector<String> layerNames = net.getUnconnectedOutLayersNames();
|
||||
std::vector< std::vector<Mat> > outputs_;
|
||||
std::vector<Mat> outputs;
|
||||
try
|
||||
{
|
||||
net.forward(outputs_, layerNames);
|
||||
net.forward(outputs, layerNames);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
@ -1182,8 +1182,7 @@ TEST_P(Test_ONNX_conformance, Layer_Test)
|
||||
applyTestTag(CV_TEST_TAG_DNN_ERROR_FORWARD);
|
||||
throw;
|
||||
}
|
||||
ASSERT_GE(outputs_.size(), 1);
|
||||
const std::vector<Mat>& outputs = outputs_[0];
|
||||
ASSERT_GE(outputs.size(), 1);
|
||||
|
||||
if (checkLayersFallbacks && checkFallbacks(net))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user