Closed abhishekpalit09 closed 5 years ago
1- Please confirm that both facial_expression_model_structure.json and test.py files are put in the same directory and json file copied from this link: https://github.com/serengil/tensorflow-101/blob/master/model/facial_expression_model_structure.json
2- Please confirm that you and me have same python, tensorflow and keras environments. My environment versions are:
(tensorflow) C:\Users\IS96273>python --version Python 3.5.5 :: Anaconda, Inc.
import tensorflow as tf print(tf.version) 1.9.0
import keras print(keras.version) 2.2.0
face expression recognizer initialization
model = model_from_json(open("facial_expression_model_structure.json", "r").read())
This code generates the following issue: Traceback (most recent call last): File "C:/Users/palitabhishek/Documents/Analysis/Face_Recognition/test.py", line 4, in
model = model_from_json(open("facial_expression_model_structure.json", "r").read())
File "C:\Users\palitabhishek\AppData\Local\Programs\Python\Python36\lib\site-packages\keras\engine\saving.py", line 490, in model_from_json
config = json.loads(json_string)
File "C:\Users\palitabhishek\AppData\Local\Programs\Python\Python36\lib\json__init__.py", line 354, in loads
return _default_decoder.decode(s)
File "C:\Users\palitabhishek\AppData\Local\Programs\Python\Python36\lib\json\decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Users\palitabhishek\AppData\Local\Programs\Python\Python36\lib\json\decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 7 column 1 (char 6)
Please help me correct the same.