Pyinstaller created exe file can not load a keras nn model

前端 未结 2 1470
眼角桃花
眼角桃花 2020-12-10 08:58

My python scrip includes:

from keras.models import model_from_json
model = model_from_json(open(\"test.json\").read())
model.load_weights(\"test.h5\")
model.         


        
2条回答
  •  执念已碎
    2020-12-10 09:58

    This resolved the error:

    pyinstaller -w --hidden-import=h5py.defs --hidden-import=h5py.utils --hidden-import=h5py.h5ac --hidden-import=h5py._proxy myscript.py

提交回复
热议问题