當我在使用keras訓練我的CNN模型期間保存重量時,它說ImportError:'save_weights' requires h5py
,但我已經安裝了h5py。ImportError:'save_weights'requires h5py
如果有人能解釋如何解決這個問題,我將不勝感激。
當我在使用keras訓練我的CNN模型期間保存重量時,它說ImportError:'save_weights' requires h5py
,但我已經安裝了h5py。ImportError:'save_weights'requires h5py
如果有人能解釋如何解決這個問題,我將不勝感激。
我得到了和你一樣的錯誤。 我安裝了這裏列出的所有要求:https://github.com/fchollet/keras/issues/3426
最後只是需要重新啓動,它開始工作。
我想你可能會錯過這個 from keras.applications import imagenet_utils
這個答案背後的基本原理是什麼? –
只需安裝必要的軟件包
sudo apt-get install libhdf5-dev
pip install h5py
如果您使用的是Windows和python IDE,開cmd
並輸入以下命令:
pip install h5py
pip install cython
我希望它有幫助。
哪個答案適合你?請選擇它作爲答案,這對像我這樣的未來訪問者會有所幫助。 –