Keras: ImportError: `save_model` requires h5py even thought the code already imported h5py

前端 未结 2 2062
花落未央
花落未央 2021-01-13 16:15

I ran into some trouble when trying to save a Keras model:

Here is my code:

import h5py
from keras.models import load_model

try:
    import h5py
            


        
2条回答
  •  旧时难觅i
    2021-01-13 17:03

    Make sure you use the latest version of Keras.

    Also, this error has been reported here in the keras github: https://github.com/fchollet/keras/issues/3426

    on linux:

    sudo apt-get install libhdf5
    sudo pip install h5py
    

提交回复
热议问题