Open yaojian95 opened 1 year ago
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 from tf.keras.Model
,
Layer
instances must be assigned to object attributes, typically in the
constructor. See the documentation of tf.train.Checkpoint
and
tf.keras.Model
for details.
While the formats are the same, do not mix save_weights
and
tf.train.Checkpoint
. Checkpoints saved by Model.save_weights
should be
loaded using Model.load_weights
. Checkpoints saved using
tf.train.Checkpoint.save
should be restored using the corresponding
tf.train.Checkpoint.restore
. Prefer tf.train.Checkpoint
over
save_weights
for training checkpoints.
INPORTANT: recomposing the patches onto the full-sky healpix maps needs long time
https://www.tensorflow.org/tutorials/keras/save_and_load#save_the_entire_model