ImportError: cannot import name 'estimator' from 'tensorflow.compat.v1'
I try to train an ssd_mobilenetv1 tflite model in wsl2 ubuntu22 with tensorflow 2.17 and python3.10.
My step is:
git clone https://github.com/tensorflow/models.git
cd models/research/
protoc object_detection/protos/*.proto --python_out=.
cp object_detection/packages/tf2/setup.py .
python -m pip install .
python model_main_tf2.py \
--pipeline_config_path=/mnt/d/workspace/PycharmProjects/models/research/object_detection/configs/tf2/ssd_mobilenet_v1_fpn_640x640_coco17_tpu-8.config \
--model_dir=/mnt/d/workspace/imgupload/img/selected1/bt3/train/model \
--alsologtostderr
but the errors occured:
2024-08-13 23:38:50.434079: I tensorflow/core/util/port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable TF_ENABLE_ONEDNN_OPTS=0.
2024-08-13 23:38:50.673212: 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-13 23:38:50.795309: 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-13 23:38:50.822108: 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-13 23:38:51.054283: 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 AVX_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2024-08-13 23:38:53.083424: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
Traceback (most recent call last):
File "/home/lbf/models/research/object_detection/model_main_tf2.py", line 31, in
Try tensorflow version <= 2.15
Try tensorflow version <= 2.15
This is not the solution. model_main_tf2.py will not work at all when downgraded to tensorflow 2.15 due to missing dependencies and calling "pip3 install --user -r models/official/requirements.txt" install back tensorflow 2.18.
Try tensorflow version <= 2.15
This is not the solution. model_main_tf2.py will not work at all when downgraded to tensorflow 2.15 due to missing dependencies and calling "pip3 install --user -r models/official/requirements.txt" install back tensorflow 2.18.
Any news on that? I am facing the same issue
Any luck on this issue? I am also facing same issue. Haven't found any solution online.
any suggesstion how to solve this . I am stuck here as well