|TensorFlow 1 version||View source on GitHub|
Clone a Functional or Sequential
Compat aliases for migration
See Migration guide for more details.
tf.keras.models.clone_model( model, input_tensors=None, clone_function=None )
Used in the notebooks
|Used in the guide||Used in the tutorials|
Model cloning is similar to calling a model on new inputs, except that it creates new layers (and thus new weights) instead of sharing the weights of the existing layers.
clone_model will not preserve the uniqueness of shared objects within the
model (e.g. a single variable attached to two distinct layers will be
restored as two separate variables).