74e741619f700d8533d0925de5f566999a1ff62e,tensorflow/python/keras/saving/saved_model/layer_serialization.py,LayerSavedModelSaver,_python_properties_internal,#LayerSavedModelSaver#,43

Before Change


    // TODO(kathywu): Synchronize with the keras spec (go/keras-json-spec) once
    // the python config serialization has caught up.
    metadata = dict(
        class_name=generic_utils.get_registered_name(type(self.obj)),
        name=self.obj.name,
        trainable=self.obj.trainable,
        expects_training_arg=self.obj._expects_training_arg,  // pylint: disable=protected-access
        dtype=policy.serialize(self.obj._dtype_policy),  // pylint: disable=protected-access
        batch_input_shape=getattr(self.obj, "_batch_input_shape", None),
        stateful=self.obj.stateful,
        must_restore_from_config=self.obj._must_restore_from_config,  // pylint: disable=protected-access
    )

    metadata.update(get_config(self.obj))
    if self.obj.input_spec is not None:
      // Layer"s input_spec has already been type-checked in the property setter.
      metadata["input_spec"] = nest.map_structure(
          lambda x: generic_utils.serialize_keras_object(x) if x else None,

After Change


        must_restore_from_config=self.obj._must_restore_from_config,  // pylint: disable=protected-access
    )

    metadata.update(get_serialized(self.obj))
    if self.obj.input_spec is not None:
      // Layer"s input_spec has already been type-checked in the property setter.
      metadata["input_spec"] = nest.map_structure(
          lambda x: generic_utils.serialize_keras_object(x) if x else None,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: tensorflow/tensorflow
Commit Name: 74e741619f700d8533d0925de5f566999a1ff62e
Time: 2021-01-25
Author: danielellis@google.com
File Name: tensorflow/python/keras/saving/saved_model/layer_serialization.py
Class Name: LayerSavedModelSaver
Method Name: _python_properties_internal


Project Name: keras-team/keras
Commit Name: 4949a72328a54628eebb1dbf4bd04ed8d89fcd38
Time: 2021-02-03
Author: scottzhu@google.com
File Name: keras/saving/saved_model/layer_serialization.py
Class Name: LayerSavedModelSaver
Method Name: _python_properties_internal


Project Name: tensorflow/tensorflow
Commit Name: c013c35e5d92a55ed5c1371ae36971de5609507d
Time: 2021-01-21
Author: danielellis@google.com
File Name: tensorflow/python/keras/saving/saved_model/layer_serialization.py
Class Name: LayerSavedModelSaver
Method Name: _python_properties_internal


Project Name: keras-team/keras
Commit Name: f1d2a776dfa29bf08a8a13745be82e7d6788e365
Time: 2021-01-25
Author: scottzhu@google.com
File Name: keras/saving/saved_model/layer_serialization.py
Class Name: LayerSavedModelSaver
Method Name: _python_properties_internal