Skip to content

Commit

Permalink
fix: release memory after predict (#10688)
Browse files Browse the repository at this point in the history
* fix: release memory after predict

* fix: release memory
  • Loading branch information
chungchamchi19 authored Aug 30, 2023
1 parent c13a50c commit 15963b0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tools/infer/predict_rec.py
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,7 @@ def __call__(self, img_list):
preds = outputs
else:
preds = outputs[0]
self.predictor.try_shrink_memory()
rec_result = self.postprocess_op(preds)
for rno in range(len(rec_result)):
rec_res[indices[beg_img_no + rno]] = rec_result[rno]
Expand Down

0 comments on commit 15963b0

Please sign in to comment.