Skip to content

Commit

Permalink
Try slicing outputs differently
Browse files Browse the repository at this point in the history
  • Loading branch information
mgoin committed Jul 11, 2023
1 parent 64b45ac commit d0b6292
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/deepsparse/utils/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,8 @@ def join_engine_outputs(

# If we can't evenly divide with batch size, remove the remainder as padding
if candidate_output[0].shape[0] > orig_batch_size:
candidate_output = [out[:orig_batch_size] for out in candidate_output]
for i in range(len(candidate_output)):
candidate_output[i] = candidate_output[i][:orig_batch_size]


return candidate_output

0 comments on commit d0b6292

Please sign in to comment.