我训练了5个神经网络模型,想和队友分享。我不想将它们一一保存到 5 个 .h5 模型。有什么方法可以将它们保存到一个 .h5 文件中?
这是我将一个模型保存/加载到一个文件的方法。
# save the entire model
model.save('model.h5') # model is a trained keras model.
# load the saved model
from keras.models import load_model
model = load_model('my_model.h5')
谢谢!