为什么新样本首次推理速度都会慢?
DemonDamon opened this issue · comments
Damon Li commented
zhoujun commented
第一次模型预热
Damon Li commented
比如我第一次输了样本a需要5秒,第二次0.95秒,然后继续输入样本b也需要5秒?这事没太理解,那以后给用户使用,推理前我都得先后台跑一次?
Get Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: zhoujun ***@***.***>
Sent: Friday, November 10, 2023 1:57:57 PM
To: WenmuZhou/PytorchOCR ***@***.***>
Cc: Damon Li ***@***.***>; Author ***@***.***>
Subject: Re: [WenmuZhou/PytorchOCR] 为什么第一次推理速度会慢? (Issue #279)
第一次模型预热
―
Reply to this email directly, view it on GitHub<#279 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AE4MZPHEJ6XO5MZLWYYYFW3YDW66LAVCNFSM6AAAAAA7FPUBKOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBVGE2DKMRTHA>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
zhoujun commented
第一次5s,后续的都是0.95s,也就是说加载模型后的第一次运行会慢,其他都ok
Damon Li commented
不是的,换一个新样本进行推理,第一次还是5s?重复predict才变到0.95?