tensorflow / rust

Rust language bindings for TensorFlow
Apache License 2.0
5.13k stars 422 forks source link

`python examples/mobilenetv3/create_model.py` fails with `ValueError` #427

Open MobilenetModel opened 1 month ago

MobilenetModel commented 1 month ago
$  python examples/mobilenetv3/create_model.py
2024-08-01 22:36:45.200740: I external/local_xla/xla/tsl/cuda/cudart_stub.cc:32] Could not find cuda drivers on your machine, GPU will not be used.
2024-08-01 22:36:45.251257: I external/local_xla/xla/tsl/cuda/cudart_stub.cc:32] Could not find cuda drivers on your machine, GPU will not be used.
2024-08-01 22:36:45.292305: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:485] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
2024-08-01 22:36:45.350440: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:8454] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
2024-08-01 22:36:45.369680: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1452] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
2024-08-01 22:36:45.439290: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2024-08-01 22:36:46.421561: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
Downloading data from https://storage.googleapis.com/tensorflow/keras-applications/mobilenet_v3/weights_mobilenet_v3_small_224_1.0_float.h5
10734624/10734624 ━━━━━━━━━━━━━━━━━━━━ 0s 0us/step
Traceback (most recent call last):
  File "/rust/examples/mobilenetv3/create_model.py", line 10, in <module>
    model.save(directory, save_format="tf")
  File "/rust/venv/lib/python3.10/site-packages/keras/src/utils/traceback_utils.py", line 122, in error_handler
    raise e.with_traceback(filtered_tb) from None
  File "/rust/venv/lib/python3.10/site-packages/keras/src/saving/saving_api.py", line 68, in save_model
    raise ValueError(
ValueError: The `save_format` argument is deprecated in Keras 3. Please remove this argument and pass a file path with either `.keras` or `.h5` extension.Received: save_format=tf