Expecting property name enclosed in double quotes: line 1 column 2 (char 1) in efficientnet

Đang mở
#952 0 bình luận 1 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
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
Lĩnh vực
machine-learning

Hướng nghiên cứu

The failure is in the json.loads() call that parses labels_map_file, which is read in eval_ckpt_main.py. Find where that file is read and parsed, then check the format of labels_map.txt, which has unquoted keys and single-quoted values. Reproduce the error by running the eval command with the example panda.jpg. Done when the labels map parses and the example prints a prediction, without editing labels_map.txt by hand.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

efficientnet.
When I run the command
"
python eval_ckpt_main.py --model_name=$MODEL --ckpt_dir=$MODEL --example_img=panda.jpg --labels_map_file=labels_map.txt
"

it has the problem in json.loads(). It's because the keys of the json don't have quotes.
Add quotes around the keys:
"
x = tf.gfile.Open(labels_map_file).read()
x = re.sub(r'(\w+):', r'"\1":', x)
"

But then another problem happens: "Expecting value: line 1 column 7 (char 6)",you can run
"
x = x.replace("'", '"')
"

and delete the "'" in the value in the txt flie when you are debugging.

Ngôn ngữ chính
Jupyter Notebook
Star
5.3k
Fork
1.7k
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

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của tensorflow/tpu

Tất cả issue của tensorflow/tpu

Issue tương tự

Thêm issue về Machine Learning

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.