Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
Paula Derrenger 2024-11-21 23:51:37 +01:00 committed by GitHub
parent 77c3c0aaac
commit d670bcc2b9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 32 additions and 44 deletions

View file

@ -675,7 +675,7 @@ def profile(input, ops, n=10, device=None, max_num_obj=0):
torch.randn(
x.shape[0],
max_num_obj,
int(sum([(x.shape[-1] / s) * (x.shape[-2] / s) for s in m.stride.tolist()])),
int(sum((x.shape[-1] / s) * (x.shape[-2] / s) for s in m.stride.tolist())),
device=device,
dtype=torch.float32,
)