-
Notifications
You must be signed in to change notification settings - Fork 45
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
master 解码性能问题 #588
Comments
感谢您的反馈。我们会安排开发工程师进行测试后,合入您所提供的代码。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
mindocr/mindocr/models/heads/rec_master_decoder.py
Line 148 in 1249bc0
这段代码有两个性能问题:1. 每次targets 长度会变化,会触发图编译,导致infer 的时间变长。如果steps过长会导致很慢。不利于调试。2. probs 每次会append 一个大tensor,步长过长,会导致显存占用过大,会浪费显存。
可以改成这样:
The text was updated successfully, but these errors were encountered: