📜  克隆 keras 模型 - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:19.409000             🧑  作者: Mango

代码示例1
model_copy= keras.models.clone_model(model1)
model_copy.build((None, 10)) # replace 10 with number of variables in input layer
model_copy.compile(optimizer='rmsprop', loss='categorical_crossentropy')
model_copy.set_weights(model.get_weights())