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

为什么新样本首次推理速度都会慢? #279

Closed
DemonDamon opened this issue Nov 10, 2023 · 4 comments
Closed

为什么新样本首次推理速度都会慢? #279

DemonDamon opened this issue Nov 10, 2023 · 4 comments

Comments

@DemonDamon
Copy link

image
如上图,我开了gpu,第一次推理很慢,同一个实例第二次推理非常快,什么原理请问?

关掉服务重启也一样。

尝试新的实例都一样,第一次都会很慢,第二次就很快,为什么呢?

@WenmuZhou
Copy link
Owner

第一次模型预热

@DemonDamon
Copy link
Author

DemonDamon commented Nov 11, 2023 via email

@WenmuZhou
Copy link
Owner

第一次5s,后续的都是0.95s,也就是说加载模型后的第一次运行会慢,其他都ok

@DemonDamon
Copy link
Author

不是的,换一个新样本进行推理,第一次还是5s?重复predict才变到0.95?

@DemonDamon DemonDamon changed the title 为什么第一次推理速度会慢? 为什么新样本首次推理速度都会慢? Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants