Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: release memory after predict #10688

Conversation

chungchamchi19
Copy link

@chungchamchi19 chungchamchi19 commented Aug 21, 2023

What?

I have the problem running OCR with CPU/GPU that I run through both AWS EC2 instance and my local machine (CPU) and see memory increase infinitely.
There are some issues like me such as:

How?

After tracing, I see predict_rec.py not release memory when predicted. I add self.predictor.try_shrink_memory() like in predict_cls.py and it works.

@paddle-bot
Copy link

paddle-bot bot commented Aug 21, 2023

Thanks for your contribution!

@CLAassistant
Copy link

CLAassistant commented Aug 21, 2023

CLA assistant check
All committers have signed the CLA.

@tink2123
Copy link
Collaborator

Thanks for your contribution, please cherry-pick to dygraph branch.

Copy link
Collaborator

@tink2123 tink2123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@shiyutang shiyutang merged commit 15963b0 into PaddlePaddle:release/2.7 Aug 30, 2023
2 checks passed
jzhang533 pushed a commit to jzhang533/PaddleOCR that referenced this pull request Mar 28, 2024
* fix: release memory after predict

* fix: release memory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants