fix arithemtic bug
This commit is contained in:
parent
e13930eb33
commit
f726904a8b
|
@ -628,8 +628,6 @@ bool ArithmeticSimplify::DoArithmeticTrans(const inner::LiteGraphPtr &litegraph)
|
||||||
// get the new node to replace
|
// get the new node to replace
|
||||||
inner::NodePtr alter_graph_node = cur_pattern->AlterGraph(para_to_ref, const_to_ref, *iter);
|
inner::NodePtr alter_graph_node = cur_pattern->AlterGraph(para_to_ref, const_to_ref, *iter);
|
||||||
(*iter)->ReplaceWith(alter_graph_node);
|
(*iter)->ReplaceWith(alter_graph_node);
|
||||||
ops_list = litegraph->GetOrderedNodes();
|
|
||||||
iter = ops_list.rbegin();
|
|
||||||
changed = true;
|
changed = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -637,6 +635,8 @@ bool ArithmeticSimplify::DoArithmeticTrans(const inner::LiteGraphPtr &litegraph)
|
||||||
}
|
}
|
||||||
if (!can_simplify) {
|
if (!can_simplify) {
|
||||||
++iter;
|
++iter;
|
||||||
|
} else {
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return changed;
|
return changed;
|
||||||
|
|
Loading…
Reference in New Issue