Fix IS_PYTHON_3_12 bug (#9258)

Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
Glenn Jocher 2024-03-23 21:18:15 +01:00 committed by GitHub
parent 35233822d8
commit ebbbdd7e25
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 2 deletions

View file

@ -726,4 +726,4 @@ def cuda_is_available() -> bool:
# Define constants
IS_PYTHON_3_12 = check_version(PYTHON_VERSION, "==3.12", name="Python ", hard=False)
IS_PYTHON_3_12 = PYTHON_VERSION.startswith("3.12")

View file

@ -24,6 +24,7 @@ try:
except ImportError:
thop = None
# Version checks (all default to version>=min_version)
TORCH_1_9 = check_version(torch.__version__, "1.9.0")
TORCH_1_13 = check_version(torch.__version__, "1.13.0")
TORCH_2_0 = check_version(torch.__version__, "2.0.0")