ImportError: cannot import name 'estimator' from 'tensorflow.compat.v1'
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 35/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- python, tensorflow
- Domaine
- machine-learning
Piste de recherche
Commencez par reproduire la configuration signalée à partir de object_detection/packages/tf2/setup.py et exécuter object_detection/model_main_tf2.py avec TensorFlow 2.17. Examinez object_detection/inputs.py, où tensorflow.compat.v1.estimator est importé, et comparez les versions de dépendances prises en charge. Le travail est considéré comme terminé lorsque l’installation documentée ne déclenche plus cet ImportError au démarrage de model_main_tf2.py.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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
from object_detection import model_lib_v2
File "/home/lbf/env2/lib/python3.10/site-packages/object_detection/model_lib_v2.py", line 30, in
from object_detection import inputs
File "/home/lbf/env2/lib/python3.10/site-packages/object_detection/inputs.py", line 24, in
from tensorflow.compat.v1 import estimator as tf_estimator
ImportError: cannot import name 'estimator' from 'tensorflow.compat.v1' (/home/lbf/env2/lib/python3.10/site-packages/tensorflow/_api/v2/compat/v1/init.py)
- Langage dominant
- Python
- Étoiles
- 77.6k
- Forks
- 44.8k
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de tensorflow/models
-
Verify evals on Papers with CodeOuverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 72/100
tensorflow/models#13653 ·
-
object_detection_tutorial.ipynb pretrained model "resnet50 imagenet"Peut-être à nouveau libre @laxmareddyp l’a pris il y a 203 jours, et aucune pull request n’est ouverte. Ouvertetype:support
tensorflow/models#13634 · 2 commentaires · 1 réaction · 1 personne assignée ·
-
Tag version compatible with Tensorflow 2.20Peut-être à nouveau libre @bharatjetti l’a pris il y a 278 jours, et aucune pull request n’est ouverte. Ouvertemodels:official type:bug
tensorflow/models#13607 · 1 commentaire · 1 personne assignée ·
-
models:research type:feature
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 10/100
tensorflow/models#13600 ·
-
Installation Issues on Python 3.13Peut-être à nouveau libre @bharatjetti l’a pris il y a 247 jours, et aucune pull request n’est ouverte. Ouvertemodels:official type:bug
tensorflow/models#13587 · 9 commentaires · 1 personne assignée ·
Toutes les issues de tensorflow/models
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
Les mainteneurs répondent en général sous 1 jour
-
bug z-test-failure
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
torch-spyre/spyre-inference#1598 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
zilliztech/memsearch#853 ·
Les mainteneurs répondent en général sous 1 jour
-
IPA charactersOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 66/100
tywr/Nordwand-Mono#55 ·
Les mainteneurs répondent en général sous 1 jour
-
physical
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
antonyrag/ragleap-core#1339 ·