Save model weights in the SavedModel format
save_model_weights_tf(object, filepath, overwrite = TRUE) load_model_weights_tf( object, filepath, by_name = FALSE, skip_mismatch = FALSE, reshape = FALSE )
Model object to save/load
Path to the file
Whether to silently overwrite any existing file at the target location
Whether to load weights by name or by topological order.
Logical, whether to skip loading of layers
where there is a mismatch in the number of weights, or a mismatch in the
shape of the weight (only valid when
Reshape weights to fit the layer when the correct number of values are present but the shape does not match.
When saving in TensorFlow format, all objects referenced by the network
are saved in the same format as
tf.train.Checkpoint, including any Layer instances
or Optimizer instances assigned to object attributes. For networks constructed from
inputs and outputs using
tf.keras.Model(inputs, outputs), Layer instances used by
the network are tracked/saved automatically. For user-defined classes which inherit
tf.keras.Model, Layer instances must be assigned to object attributes,
typically in the constructor.
See the documentation of
tf.keras.Model for details.