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

Aperta
#952 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Jupyter Notebook
Stelle
5.3k
Fork
1.7k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di tensorflow/tpu

Tutte le issue di tensorflow/tpu

Issue simili

Altre issue su Machine Learning

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.