52 lines
1.8 KiB
Protocol Buffer
52 lines
1.8 KiB
Protocol Buffer
// Copyright 2026 The TensorFlow Authors. All Rights Reserved.
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
// ==============================================================================
|
|
|
|
// Protobuf containing the metadata for each Keras object saved in a SavedModel.
|
|
|
|
syntax = "proto3";
|
|
|
|
package third_party.tensorflow.python.keras.protobuf;
|
|
|
|
import "tensorflow/python/keras/protobuf/versions.proto";
|
|
|
|
message SavedMetadata {
|
|
// Nodes represent trackable objects in the SavedModel. The data for every
|
|
// Keras object is stored.
|
|
repeated SavedObject nodes = 1;
|
|
}
|
|
|
|
// Metadata of an individual Keras object.
|
|
message SavedObject {
|
|
reserved 1; // For previous VersionDef info.
|
|
|
|
// Index of the node in the SavedModel SavedObjectGraph.
|
|
int32 node_id = 2;
|
|
// String path from root (e.g. "root.child_layer")
|
|
string node_path = 3;
|
|
|
|
// Identifier to determine loading function.
|
|
// Must be one of:
|
|
// _tf_keras_input_layer, _tf_keras_layer, _tf_keras_metric,
|
|
// _tf_keras_model, _tf_keras_network, _tf_keras_rnn_layer,
|
|
// _tf_keras_sequential
|
|
string identifier = 4;
|
|
// Metadata containing a JSON-serialized object with the non-TensorFlow
|
|
// attributes for this Keras object.
|
|
string metadata = 5;
|
|
|
|
// Version defined by the code serializing this Keras object.
|
|
third_party.tensorflow.python.keras.protobuf.VersionDef version = 6;
|
|
}
|