Skip to content

Commit

Permalink
[Fix] Remove ValueError in generate_random_inputs (#965)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbogunowicz committed Mar 21, 2023
1 parent ea4b41f commit 326f513
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/deepsparse/utils/onnx.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,11 +214,6 @@ def generate_random_inputs(
input_tensor_type = external_input.type.tensor_type
elem_type = translate_onnx_type_to_numpy(input_tensor_type.elem_type)
in_shape = [int(d.dim_value) for d in input_tensor_type.shape.dim]
if 0 in in_shape:
raise ValueError(
"Attempting to benchmark a model with dynamic shape using "
"randomly generated inputs. Please set the inputs to static"
)

if batch_size is not None:
in_shape[0] = batch_size
Expand Down

0 comments on commit 326f513

Please sign in to comment.