Skip to content

Commit

Permalink
Make input_shapes into a list of lists if only a list was passed (#914)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgoin committed Feb 21, 2023
1 parent 2bb1bdd commit e40b40e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/deepsparse/utils/onnx.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,8 @@ def override_onnx_input_shapes(
]

# Input shapes should be a list of lists, even if there is only one input
assert all(isinstance(inp, list) for inp in input_shapes)
if not all(isinstance(inp, list) for inp in input_shapes):
input_shapes = [input_shapes]

# If there is a single input shape given and multiple inputs,
# duplicate for all inputs to apply the same shape
Expand Down

0 comments on commit e40b40e

Please sign in to comment.