Electron microscopy
 
tf.keras.model.save
- Python for Integrated Circuits -
- An Online Book -
Python for Integrated Circuits                                                                                   http://www.globalsino.com/ICs/        


Chapter/Index: Introduction | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | Appendix

=================================================================================

The comparison between tf.saved_model.save() and tf.keras.model.save() is:
          i) Their common properties:
              i.a) Both are used to save and load models during or after training. Two kinds of APIs for saving and loading a Keras model:
                   i.a.1) High-level (tf.keras.Model.save and tf.keras.models.load_model),
                   i.a.2) How-level (tf.saved_model.save and tf.saved_model.load).
              i.b) Both can be used to save the data as a graph. At this point, there is almost no difference.
              i.c) Both take the same argument.
          ii) tf.keras.model.save:
              ii.a) It is .h5 format.
              ii.b) It can be used to save a Keras model in the saved_model format.
          iii) tf.saved_model.save:
              iii.a) It is more generic.
              iii.b) It is a plain TensorFlow SavedModel and cannot directly be loaded into a keras model since it lacks a keras_metadata.pb file. You have to load it like a normal SavedModel and wrap it in a keras model.

          Model.save(
          filepath,
          overwrite=True,
          include_optimizer=True,
          save_format=None,
          signatures=None,
          options=None,
          save_traces=True,
          )

The save_traces parameter by default is set as True. It can be set as False if you want to.

============================================

         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         

 

 

 

 

 



















































 

 

 

 

 

=================================================================================