ImportError: cannot import name 'estimator' from 'tensorflow.compat.v1'
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- python, tensorflow
- Bereich
- machine-learning
Rechercherichtung
Beginne damit, die gemeldete Einrichtung aus object_detection/packages/tf2/setup.py zu reproduzieren und object_detection/model_main_tf2.py mit TensorFlow 2.17 auszuführen. Untersuche object_detection/inputs.py, wo tensorflow.compat.v1.estimator importiert wird, und vergleiche die unterstützten Abhängigkeitsversionen. Als erledigt gilt die Aufgabe, wenn die dokumentierte Installation beim Start von model_main_tf2.py nicht mehr diesen ImportError auslöst.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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)
- Vorherrschende Sprache
- Python
- Sterne
- 77.6k
- Forks
- 44.8k
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus tensorflow/models
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 72/100
tensorflow/models#13653 ·
-
object_detection_tutorial.ipynb pretrained model "resnet50 imagenet"Evtl. wieder frei @laxmareddyp hat das vor 203 Tagen übernommen, und es ist kein Pull Request offen. Offentype:support
tensorflow/models#13634 · 2 Kommentare · 1 Reaktion · 1 zugewiesene Person ·
-
Tag version compatible with Tensorflow 2.20Evtl. wieder frei @bharatjetti hat das vor 278 Tagen übernommen, und es ist kein Pull Request offen. Offenmodels:official type:bug
tensorflow/models#13607 · 1 Kommentar · 1 zugewiesene Person ·
-
models:research type:feature
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 10/100
tensorflow/models#13600 ·
-
Installation Issues on Python 3.13Evtl. wieder frei @bharatjetti hat das vor 247 Tagen übernommen, und es ist kein Pull Request offen. Offenmodels:official type:bug
tensorflow/models#13587 · 9 Kommentare · 1 zugewiesene Person ·
Alle Issues in tensorflow/models
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
FAIRmat-NFDI/pynxtools#861 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
NVIDIA/nsight-python#88 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Criteria can pass when the deliverable is missingEvtl. vergeben @clementtisseau hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
harveyai/harvey-labs#217 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
Maintainer antworten meist innerhalb von 1 Tag
-
priority/medium roadmap/v1.1.1 stakeholder/rapr type/bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 83/100
databrickslabs/ontos#1420 ·
Maintainer antworten meist innerhalb von 3 Tagen