📜  复制模型 keras - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:42.043000             🧑  作者: 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())