Minor Results.to_sql cleanup (#19081)

Co-authored-by: Muhammad Rizwan Munawar <muhammadrizwanmunawar123@gmail.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
Laughing 2025-02-07 11:19:58 +08:00 committed by GitHub
parent c526a652ab
commit 116813d3c0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 20 deletions

View file

@ -131,7 +131,7 @@ def check_imgsz(imgsz, stride=32, min_dim=1, max_dim=2, floor=0):
floor (int): Minimum allowed value for image size.
Returns:
(List[int]): Updated image size.
(List[int] | int): Updated image size.
"""
# Convert stride to integer if it is a tensor
stride = int(stride.max() if isinstance(stride, torch.Tensor) else stride)