Commit 53dde901 authored by Paul's avatar Paul
Browse files

Merge branch 'master' into matcher

parents 96f0f567 f9f4f713
...@@ -351,11 +351,10 @@ struct onnx_parser ...@@ -351,11 +351,10 @@ struct onnx_parser
if(node.name().empty()) if(node.name().empty())
{ {
std::string generated = "migraph_unnamed_node"; std::string generated = "migraph_unnamed_node";
for(auto&& output : node.output()) return std::accumulate(node.output().begin(),
{ node.output().end(),
generated += "_" + output; generated,
} [](auto x, auto y) { return x + "_" + y; });
return generated;
} }
return node.name(); return node.name();
} }
...@@ -488,11 +487,11 @@ struct onnx_parser ...@@ -488,11 +487,11 @@ struct onnx_parser
break; // throw std::runtime_error("Unsupported type COMPLEX128"); break; // throw std::runtime_error("Unsupported type COMPLEX128");
} }
std::vector<std::size_t> dims; std::vector<std::size_t> dims;
// TODO: USe std::transform auto&& tensor_dims = t.tensor_type().shape().dim();
for(auto&& d : t.tensor_type().shape().dim()) std::transform(tensor_dims.begin(),
{ tensor_dims.end(),
dims.push_back(d.dim_value()); std::back_inserter(dims),
} [](auto&& d) { return d.dim_value(); });
return {shape_type, dims}; return {shape_type, dims};
} }
}; };
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment