tf.saved_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: saved_model is the universal serialization format for TensorFlow models. tf.saved_model.save(obj, export_dir, signatures=None, options=None) tf.keras.models.save_model( The save_traces parameter by default is set as True. When save_traces, applies to SavedModel format, is enabled, the SavedModel will store the function traces for each layer. This can be disabled, by setting as False, so that only the configs of each layer are stored. Disabling this will decrease serialization time and reduce file size; however, it requires that all custom layers/models implement a get_config() method. Or, another code for this funciton is: tf.saved_model.save(model, ============================================
|
||||||||
================================================================================= | ||||||||
|
||||||||