Fix serialization dynamic shapes (#3475)

* Align EpsMode attribute to specification.

* Change dynamic shape resolving in serialization.
This commit is contained in:
Jozef Daniecki 2020-12-07 04:55:10 +01:00 committed by GitHub
parent 8581a0730d
commit fc049fc6ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 5 deletions

View File

@ -303,15 +303,13 @@ bool is_exec_graph(const ngraph::Function& f) {
}
bool resolve_dynamic_shapes(const ngraph::Function& f) {
const auto & f_results = f.get_results();
if (std::all_of(f_results.begin(), f_results.end(),
const auto & f_ops = f.get_ordered_ops();
if (std::all_of(f_ops.begin(), f_ops.end(),
[](std::shared_ptr<Node> results) { return !results->is_dynamic(); })) {
return false;
}
auto f_clone = ngraph::clone_function(f);
const auto & f_ops = f.get_ordered_ops();
const auto & f_clone_ops = f_clone->get_ordered_ops();
NGRAPH_CHECK(f_ops.size() == f_clone_ops.size(), "Unexpected get_ordered_ops method behaviour");

View File

@ -118,7 +118,7 @@ namespace ngraph
NGRAPH_API EnumNames<op::EpsMode>& EnumNames<op::EpsMode>::get()
{
static auto enum_names = EnumNames<op::EpsMode>(
"op::EpsMode", {{"ADD", op::EpsMode::ADD}, {"MAX", op::EpsMode::MAX}});
"op::EpsMode", {{"add", op::EpsMode::ADD}, {"max", op::EpsMode::MAX}});
return enum_names;
}