diff --git a/export.py b/export.py index 71e4eb9..5611ab9 100644 --- a/export.py +++ b/export.py @@ -397,6 +397,11 @@ def export_saved_model(model, from models.tf import TFModel LOGGER.info(f'\n{prefix} starting export with tensorflow {tf.__version__}...') + if tf.__version__ > '2.13.1': + helper_url = 'https://github.com/ultralytics/yolov5/issues/12489' + LOGGER.info( + f'WARNING ⚠️ using Tensorflow {tf.__version__} > 2.13.1 might cause issue when exporting the model to tflite {helper_url}' + ) # handling issue https://github.com/ultralytics/yolov5/issues/12489 f = str(file).replace('.pt', '_saved_model') batch_size, ch, *imgsz = list(im.shape) # BCHW diff --git a/requirements.txt b/requirements.txt index 63f4a91..115055b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -34,7 +34,7 @@ seaborn>=0.11.0 # nvidia-pyindex # TensorRT export # nvidia-tensorrt # TensorRT export # scikit-learn<=1.1.2 # CoreML quantization -# tensorflow>=2.4.0 # TF exports (-cpu, -aarch64, -macos) +# tensorflow>=2.4.0,<=2.13.1 # TF exports (-cpu, -aarch64, -macos) # tensorflowjs>=3.9.0 # TF.js export # openvino-dev>=2023.0 # OpenVINO export