Skip to content

Commit

Permalink
fix compilation error
Browse files Browse the repository at this point in the history
Signed-off-by: daquexian <[email protected]>
  • Loading branch information
daquexian committed Dec 18, 2023
1 parent 9589dd9 commit 6698bca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions onnxsim/onnxsim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -415,13 +415,13 @@ onnx::ModelProto _FoldConstant(const onnx::ModelProto& model) {
{
onnx::ModelProto model;
model.CopyFrom(tmp);
const auto [const_nodes, non_const_nodes] = GetConstantNodes(model);
auto [const_nodes, non_const_nodes] = GetConstantNodes(model);
for (const auto& x : const_nodes) {
try {
RunOpAndAddInitializer(model, x);
} catch (const std::exception& e) {
std::cerr << "WARNING: failed to run \"" << node.op_type() <<
"\" op (name is \"" << node.name << "\"), skip..." << std::endl;
std::cerr << "WARNING: failed to run \"" << x.op_type() <<
"\" op (name is \"" << x.name << "\"), skip..." << std::endl;
non_const_nodes.push_back(x);
}
}
Expand Down

0 comments on commit 6698bca

Please sign in to comment.