tensorflow / tpu

Reference models and tools for Cloud TPUs.

Home Page:https://cloud.google.com/tpu/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

hitlhz666 opened this issue · comments

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.