ultralytics 8.2.25 latest TensorFlow 2.16 support (#13176)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com> Co-authored-by: lakshanthad <lakshanthad@yahoo.com>
This commit is contained in:
parent
d80bd840d1
commit
dd819fc420
9 changed files with 79 additions and 49 deletions
|
|
@ -1,6 +1,6 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
|
||||
__version__ = "8.2.24"
|
||||
__version__ = "8.2.25"
|
||||
|
||||
import os
|
||||
|
||||
|
|
|
|||
|
|
@ -83,7 +83,6 @@ from ultralytics.utils import (
|
|||
WINDOWS,
|
||||
__version__,
|
||||
callbacks,
|
||||
checks,
|
||||
colorstr,
|
||||
get_default_args,
|
||||
yaml_save,
|
||||
|
|
@ -813,15 +812,16 @@ class Exporter:
|
|||
import tensorflow as tf # noqa
|
||||
except ImportError:
|
||||
suffix = "-macos" if MACOS else "-aarch64" if ARM64 else "" if cuda else "-cpu"
|
||||
version = "" if ARM64 else "<=2.13.1"
|
||||
check_requirements((f"tensorflow{suffix}{version}", "keras"))
|
||||
version = ">=2.0.0"
|
||||
check_requirements(f"tensorflow{suffix}{version}")
|
||||
import tensorflow as tf # noqa
|
||||
if ARM64:
|
||||
check_requirements("cmake") # 'cmake' is needed to build onnxsim on aarch64
|
||||
check_requirements(
|
||||
(
|
||||
"keras",
|
||||
"onnx>=1.12.0",
|
||||
"onnx2tf>=1.15.4,<=1.17.5",
|
||||
"onnx2tf>1.17.5,<=1.22.3",
|
||||
"sng4onnx>=1.0.1",
|
||||
"onnxsim>=0.4.33",
|
||||
"onnx_graphsurgeon>=0.3.26",
|
||||
|
|
@ -835,7 +835,7 @@ class Exporter:
|
|||
LOGGER.info(f"\n{prefix} starting export with tensorflow {tf.__version__}...")
|
||||
check_version(
|
||||
tf.__version__,
|
||||
"<=2.13.1",
|
||||
">=2.0.0",
|
||||
name="tensorflow",
|
||||
verbose=True,
|
||||
msg="https://github.com/ultralytics/ultralytics/issues/5161",
|
||||
|
|
|
|||
|
|
@ -88,14 +88,14 @@ def benchmark(
|
|||
emoji, filename = "❌", None # export defaults
|
||||
try:
|
||||
# Checks
|
||||
if i == 5: # CoreML
|
||||
assert not (IS_RASPBERRYPI or IS_JETSON), "CoreML export not supported on Raspberry Pi or NVIDIA Jetson"
|
||||
if i == 9: # Edge TPU
|
||||
assert LINUX and not ARM64, "Edge TPU export only supported on non-aarch64 Linux"
|
||||
elif i == 7: # TF GraphDef
|
||||
if i == 7: # TF GraphDef
|
||||
assert model.task != "obb", "TensorFlow GraphDef not supported for OBB task"
|
||||
elif i == 9: # Edge TPU
|
||||
assert LINUX and not ARM64, "Edge TPU export only supported on non-aarch64 Linux"
|
||||
elif i in {5, 10}: # CoreML and TF.js
|
||||
assert MACOS or LINUX, "export only supported on macOS and Linux"
|
||||
assert MACOS or LINUX, "CoreML and TF.js export only supported on macOS and Linux"
|
||||
assert not IS_RASPBERRYPI, "CoreML and TF.js export not supported on Raspberry Pi"
|
||||
assert not IS_JETSON, "CoreML and TF.js export not supported on NVIDIA Jetson"
|
||||
if i in {3, 5}: # CoreML and OpenVINO
|
||||
assert not IS_PYTHON_3_12, "CoreML and OpenVINO not supported on Python 3.12"
|
||||
if i in {6, 7, 8, 9, 10}: # All TF formats
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue