Change references of tf.__internal__.saved_model.StructureCoder to their replacement functions
@@ -784,7 +784,6 @@ class KerasObjectLoader:
def _infer_inputs(self, layer_node_id, convert_to_shapes=False):
"""Infers input shape of layer from SavedModel functions."""
- coder = tf.__internal__.saved_model.StructureCoder()
call_fn_id = self._search_for_child_node(
layer_node_id, ['call_and_return_all_conditional_losses'])
if call_fn_id is None:
@@ -796,7 +795,7 @@ class KerasObjectLoader:
return None
call_fn_name = concrete_functions[0]
call_fn_proto = self._proto.concrete_functions[call_fn_name]
- structured_input_signature = coder.decode_proto(
+ structured_input_signature = tf.__internal__.saved_model.decode_proto(
call_fn_proto.canonicalized_input_signature)
inputs = structured_input_signature[0][0]
if convert_to_shapes:
