Meaningful warning when nGraph Constant for initializer couldn't be created (#3443)
This commit is contained in:
parent
e1a7f7e5af
commit
a493224c6b
@ -95,9 +95,15 @@ namespace ngraph
|
||||
}
|
||||
catch (const ngraph::ngraph_error& exc)
|
||||
{
|
||||
NGRAPH_WARN << "Could not create an nGraph Constant for initializer '"
|
||||
<< initializer_tensor.name() << "'. Detailed error:\n"
|
||||
<< exc.what();
|
||||
NGRAPH_WARN
|
||||
<< "\nCould not create an nGraph Constant for initializer '"
|
||||
<< initializer_tensor.name() << "'. \n"
|
||||
<< "Constant with a 0 value was created, make sure connected input is "
|
||||
"optional.\n"
|
||||
<< "Otherwise verify if the initializer contains a correct number of "
|
||||
"elements matching the initializer's shape. \n"
|
||||
<< "Detailed error:\n"
|
||||
<< exc.what();
|
||||
ng_constant =
|
||||
default_opset::Constant::create(tensor.get_ng_type(), Shape{}, {0});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user