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
pull/21540/head
Alexander Alekhin 3 years ago
parent 85719a0a5d
commit a7e6a1059c
  1. 7
      modules/dnn/test/test_onnx_conformance.cpp

@ -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…
Cancel
Save