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

How to calculate inference time #67

Closed
Thangtran27 opened this issue Apr 21, 2024 · 1 comment
Closed

How to calculate inference time #67

Thangtran27 opened this issue Apr 21, 2024 · 1 comment

Comments

@Thangtran27
Copy link

I read your paper about inference time. But I don't find the code to carry out calculating inference time. So how can I do that?
I'm looking forward to hearing from you!
image

@nagadit
Copy link
Collaborator

nagadit commented May 16, 2024

Hello @Thangtran27 !!
You can measure the inference time using this code!

time_list = []
for _ in range(100):
 st = time.time()
 out = model(input)
 time_list.append(time.time() - st)

print(np.mean(time_list)

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