Remove all the save model related code in base_layer.
They are not applicable for the v1 tf.layers case. PiperOrigin-RevId: 299962368 Change-Id: I7c6f4fb76ff3e5aa83d4fc0db817ed4e1b73a827
This commit is contained in:
parent
6b1d6f5343
commit
6f968a3a59
|
@ -42,7 +42,6 @@ py_library(
|
||||||
"//tensorflow/python/frozen_keras/utils:layer_utils",
|
"//tensorflow/python/frozen_keras/utils:layer_utils",
|
||||||
"//tensorflow/python/frozen_keras/utils:tf_utils",
|
"//tensorflow/python/frozen_keras/utils:tf_utils",
|
||||||
"//tensorflow/python/keras:metrics",
|
"//tensorflow/python/keras:metrics",
|
||||||
"//tensorflow/python/keras/saving",
|
|
||||||
"//tensorflow/python/module",
|
"//tensorflow/python/module",
|
||||||
"//tensorflow/python/ops/ragged:ragged_tensor",
|
"//tensorflow/python/ops/ragged:ragged_tensor",
|
||||||
"//tensorflow/python/training/tracking",
|
"//tensorflow/python/training/tracking",
|
||||||
|
|
|
@ -61,7 +61,6 @@ from tensorflow.python.frozen_keras.engine import node as node_module
|
||||||
from tensorflow.python.frozen_keras.utils import generic_utils
|
from tensorflow.python.frozen_keras.utils import generic_utils
|
||||||
from tensorflow.python.frozen_keras.utils import layer_utils
|
from tensorflow.python.frozen_keras.utils import layer_utils
|
||||||
from tensorflow.python.frozen_keras.utils import tf_utils
|
from tensorflow.python.frozen_keras.utils import tf_utils
|
||||||
from tensorflow.python.keras.saving.saved_model import layer_serialization
|
|
||||||
# A module that only depends on `keras.layers` import these from here.
|
# A module that only depends on `keras.layers` import these from here.
|
||||||
from tensorflow.python.keras.utils.generic_utils import to_snake_case # pylint: disable=unused-import
|
from tensorflow.python.keras.utils.generic_utils import to_snake_case # pylint: disable=unused-import
|
||||||
from tensorflow.python.keras.utils.tf_utils import is_tensor_or_tensor_list # pylint: disable=unused-import
|
from tensorflow.python.keras.utils.tf_utils import is_tensor_or_tensor_list # pylint: disable=unused-import
|
||||||
|
@ -2575,26 +2574,6 @@ class LegacyBaseLayer(module.Module):
|
||||||
|
|
||||||
# SavedModel properties. Please see keras/saving/saved_model for details.
|
# SavedModel properties. Please see keras/saving/saved_model for details.
|
||||||
|
|
||||||
@property
|
|
||||||
def _trackable_saved_model_saver(self):
|
|
||||||
return layer_serialization.LayerSavedModelSaver(self)
|
|
||||||
|
|
||||||
@property
|
|
||||||
def _object_identifier(self):
|
|
||||||
return self._trackable_saved_model_saver.object_identifier
|
|
||||||
|
|
||||||
@property
|
|
||||||
def _tracking_metadata(self):
|
|
||||||
return self._trackable_saved_model_saver.tracking_metadata
|
|
||||||
|
|
||||||
def _list_extra_dependencies_for_serialization(self, serialization_cache):
|
|
||||||
return (self._trackable_saved_model_saver
|
|
||||||
.list_extra_dependencies_for_serialization(serialization_cache))
|
|
||||||
|
|
||||||
def _list_functions_for_serialization(self, serialization_cache):
|
|
||||||
return (self._trackable_saved_model_saver
|
|
||||||
.list_functions_for_serialization(serialization_cache))
|
|
||||||
|
|
||||||
def __getstate__(self):
|
def __getstate__(self):
|
||||||
# Override to support `copy.deepcopy` and pickling.
|
# Override to support `copy.deepcopy` and pickling.
|
||||||
# Thread-local objects cannot be copied in Python 3, so pop these.
|
# Thread-local objects cannot be copied in Python 3, so pop these.
|
||||||
|
|
Loading…
Reference in New Issue