mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-06-01 23:30:35 +00:00
Remove mutable arguments from symbolic_shape_infer (#5166)
This commit is contained in:
parent
7f3aa3a163
commit
3afc2bfa73
1 changed files with 4 additions and 3 deletions
|
|
@ -34,7 +34,8 @@ def handle_negative_axis(axis, rank):
|
|||
assert axis < rank and axis >= -rank
|
||||
return axis if axis >= 0 else rank + axis
|
||||
|
||||
def get_opset(mp, domain=['', 'onnx', 'ai.onnx']):
|
||||
def get_opset(mp, domain=None):
|
||||
domain = domain or ['', 'onnx', 'ai.onnx']
|
||||
if type(domain) != list:
|
||||
domain = [domain]
|
||||
for opset in mp.opset_import:
|
||||
|
|
@ -1128,8 +1129,8 @@ class SymbolicShapeInference:
|
|||
vi = self.known_vi_[node.output[0]]
|
||||
vi.CopyFrom(new_vi)
|
||||
|
||||
def _infer_impl(self, in_mp, start_sympy_data={}):
|
||||
self.sympy_data_ = start_sympy_data
|
||||
def _infer_impl(self, in_mp, start_sympy_data=None):
|
||||
self.sympy_data_ = start_sympy_data or {}
|
||||
self.out_mp_.graph.ClearField('value_info')
|
||||
self._apply_suggested_merge(graph_input_only=True)
|
||||
self.input_symbols_ = set()
|
||||
|
|
|
|||
Loading…
Reference in a new issue