diff --git a/export.py b/export.py index 8fe7ce8fdce1..c660ce660aa5 100644 --- a/export.py +++ b/export.py @@ -405,7 +405,8 @@ def export_saved_model( try: import tensorflow as tf except Exception: - check_requirements(f"tensorflow{'' if torch.cuda.is_available() else '-macos' if MACOS else '-cpu'}") + check_requirements(f"tensorflow{'' if torch.cuda.is_available() else '-macos' if MACOS else '-cpu'}<=2.15.1") + import tensorflow as tf from tensorflow.python.framework.convert_to_constants import convert_variables_to_constants_v2