To save and revive a model: 1. Save the model using tf.saved_model.save 2. call load_from_save_model_v2 This restores various metadata about Keras models and layers, as well as their call and loss functions. Changes to object serialization: - Adds private fields for tracking object's identifier and metadata. - Added _list_extra_dependencies_for_serialization, which allows objects to save extra dependencies when serialized to SavedModel. - Object graph view maintains a serialization cache object that is passed to each object when serializing functions/extra dependencies. PiperOrigin-RevId: 251386039
18 lines
663 B
Plaintext
18 lines
663 B
Plaintext
path: "tensorflow.layers.InputSpec"
|
|
tf_class {
|
|
is_instance: "<class \'tensorflow.python.keras.engine.input_spec.InputSpec\'>"
|
|
is_instance: "<type \'object\'>"
|
|
member_method {
|
|
name: "__init__"
|
|
argspec: "args=[\'self\', \'dtype\', \'shape\', \'ndim\', \'max_ndim\', \'min_ndim\', \'axes\'], varargs=None, keywords=None, defaults=[\'None\', \'None\', \'None\', \'None\', \'None\', \'None\'], "
|
|
}
|
|
member_method {
|
|
name: "from_config"
|
|
argspec: "args=[\'cls\', \'config\'], varargs=None, keywords=None, defaults=None"
|
|
}
|
|
member_method {
|
|
name: "get_config"
|
|
argspec: "args=[\'self\'], varargs=None, keywords=None, defaults=None"
|
|
}
|
|
}
|