We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 59615dd commit 7aa8ac4Copy full SHA for 7aa8ac4
src/deepsparse/utils/onnx.py
@@ -194,7 +194,7 @@ def generate_random_inputs(
194
for i, external_input in enumerate(get_external_inputs(onnx_filepath)):
195
input_tensor_type = external_input.type.tensor_type
196
elem_type = translate_onnx_type_to_numpy(input_tensor_type.elem_type)
197
- in_shape = [int(d.dim_value) for d in input_tensor_type.shape.dim]
+ in_shape = [max(int(d.dim_value), 1) for d in input_tensor_type.shape.dim]
198
199
if batch_size is not None:
200
in_shape[0] = batch_size
0 commit comments