ImportError: cannot import name 'estimator' from 'tensorflow.compat.v1'
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- python, tensorflow
- Lĩnh vực
- machine-learning
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện thiết lập được báo cáo từ object_detection/packages/tf2/setup.py và chạy object_detection/model_main_tf2.py với TensorFlow 2.17. Kiểm tra object_detection/inputs.py, nơi tensorflow.compat.v1.estimator được import, và so sánh các phiên bản dependency được hỗ trợ. Được xem là hoàn tất khi quá trình cài đặt được ghi chép không còn phát sinh ImportError này lúc model_main_tf2.py khởi động.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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)
- Ngôn ngữ chính
- Python
- Star
- 77.6k
- Fork
- 44.8k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của tensorflow/models
-
Verify evals on Papers with CodeĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
tensorflow/models#13653 ·
-
object_detection_tutorial.ipynb pretrained model "resnet50 imagenet"Có thể làm lại được @laxmareddyp đã nhận 202 ngày trước và không có pull request nào đang mở. Đang mởtype:support
tensorflow/models#13634 · 2 bình luận · 1 reaction · 1 người được giao ·
-
Tag version compatible with Tensorflow 2.20Có thể làm lại được @bharatjetti đã nhận 276 ngày trước và không có pull request nào đang mở. Đang mởmodels:official type:bug
tensorflow/models#13607 · 1 bình luận · 1 người được giao ·
-
models:research type:feature
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 10/100
tensorflow/models#13600 ·
-
Installation Issues on Python 3.13Có thể làm lại được @bharatjetti đã nhận 245 ngày trước và không có pull request nào đang mở. Đang mởmodels:official type:bug
tensorflow/models#13587 · 9 bình luận · 1 người được giao ·
Tất cả issue của tensorflow/models
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
bigbio/sdrf-pipelines#372 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Open Source] PixelboltĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 84/100
521xueweihan/HelloGitHub#4297 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
aws-samples/sample-per-model-bedrock#822 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:study-data p2-high ready-for-agent type:chore
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
fderuiter/deruiter.dev#3706 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
awslabs/visual-asset-management-system#1234 ·
Maintainer thường phản hồi trong vòng 1 ngày