[ONNX] Update warning message for ONNX Constant node (#4355)

This commit is contained in:
Katarzyna Mitrus 2021-02-17 14:40:47 +01:00 committed by GitHub
parent f1d86b1455
commit 7df5a98dde
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -42,9 +42,14 @@ namespace ngraph
}
catch (const ngraph::ngraph_error& exc)
{
NGRAPH_WARN << "Could not create an nGraph Constant for an ONNX "
"Constant node. Detailed error:\n"
<< exc.what();
NGRAPH_WARN
<< "\nCould not create an nGraph Constant for an ONNX Constant "
"node. "
<< "Constant with a 0 value was created instead.\n"
<< "Verify if the ONNX Constant node contains a correct number of "
"elements matching the node's shape. \n"
<< "Detailed error:\n"
<< exc.what();
constant = std::make_shared<default_opset::Constant>(type, Shape{}, 0);
}