我有一个包含几个Keras模型的变量列表。我将通过
保存它with gzip.open(filename, 'wb') as handle:
cPickle.dump(list_of_vars, handle)
handle.close()
但:
ImportError: h5py must be installed in order to save a model.
然而,我目前已经安装了h5py
。我需要压缩保存变量
错误提示需要安装h5py
才能保存或加载模型
请运行以下代码来安装h5py
并解决此错误。
!pip install h5py