May 2018
Beginner
490 pages
13h 16m
English
A limited number of headers suffice to read a saved model with READ_CNN_MODEL.py, as implemented in the following lines:
from keras.models import model_from_jsonfrom keras.models import load_modelimport jsonfrom pprint import pprint
#Direction containing the model filedirectory='dataset/' print("directory",directory)
The .json model saved is now loaded from its file as shown here:
#____________________LOAD MODEL___________________________json_file = open(directory+'model/model.json', 'r')loaded_jsonf = json_file.read()loaded_json=json.loads(loaded_jsonf)json_file.close()print("MODEL:")pprint(loaded_json)
I used the pprint function in the following code instead of print to obtain a pretty print formatted ...
Read now
Unlock full access