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

オープン
#952 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Jupyter Notebook
スター
5.3k
フォーク
1.7k
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

tensorflow/tpu のほかの issue

tensorflow/tpu の issue をすべて見る

似ている issue

Machine Learning の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。