#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResourceHandleProto {
#[prost(string, tag="1")]
pub device: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub container: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub name: ::prost::alloc::string::String,
#[prost(uint64, tag="4")]
pub hash_code: u64,
#[prost(string, tag="5")]
pub maybe_type_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TensorShapeProto {
#[prost(message, repeated, tag="2")]
pub dim: ::prost::alloc::vec::Vec<tensor_shape_proto::Dim>,
#[prost(bool, tag="3")]
pub unknown_rank: bool,
}
pub mod tensor_shape_proto {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Dim {
#[prost(int64, tag="1")]
pub size: i64,
#[prost(string, tag="2")]
pub name: ::prost::alloc::string::String,
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum DataType {
DtInvalid = 0,
DtFloat = 1,
DtDouble = 2,
DtInt32 = 3,
DtUint8 = 4,
DtInt16 = 5,
DtInt8 = 6,
DtString = 7,
DtComplex64 = 8,
DtInt64 = 9,
DtBool = 10,
DtQint8 = 11,
DtQuint8 = 12,
DtQint32 = 13,
DtBfloat16 = 14,
DtQint16 = 15,
DtQuint16 = 16,
DtUint16 = 17,
DtComplex128 = 18,
DtHalf = 19,
DtResource = 20,
DtVariant = 21,
DtUint32 = 22,
DtUint64 = 23,
DtFloatRef = 101,
DtDoubleRef = 102,
DtInt32Ref = 103,
DtUint8Ref = 104,
DtInt16Ref = 105,
DtInt8Ref = 106,
DtStringRef = 107,
DtComplex64Ref = 108,
DtInt64Ref = 109,
DtBoolRef = 110,
DtQint8Ref = 111,
DtQuint8Ref = 112,
DtQint32Ref = 113,
DtBfloat16Ref = 114,
DtQint16Ref = 115,
DtQuint16Ref = 116,
DtUint16Ref = 117,
DtComplex128Ref = 118,
DtHalfRef = 119,
DtResourceRef = 120,
DtVariantRef = 121,
DtUint32Ref = 122,
DtUint64Ref = 123,
}
impl DataType {
pub fn as_str_name(&self) -> &'static str {
match self {
DataType::DtInvalid => "DT_INVALID",
DataType::DtFloat => "DT_FLOAT",
DataType::DtDouble => "DT_DOUBLE",
DataType::DtInt32 => "DT_INT32",
DataType::DtUint8 => "DT_UINT8",
DataType::DtInt16 => "DT_INT16",
DataType::DtInt8 => "DT_INT8",
DataType::DtString => "DT_STRING",
DataType::DtComplex64 => "DT_COMPLEX64",
DataType::DtInt64 => "DT_INT64",
DataType::DtBool => "DT_BOOL",
DataType::DtQint8 => "DT_QINT8",
DataType::DtQuint8 => "DT_QUINT8",
DataType::DtQint32 => "DT_QINT32",
DataType::DtBfloat16 => "DT_BFLOAT16",
DataType::DtQint16 => "DT_QINT16",
DataType::DtQuint16 => "DT_QUINT16",
DataType::DtUint16 => "DT_UINT16",
DataType::DtComplex128 => "DT_COMPLEX128",
DataType::DtHalf => "DT_HALF",
DataType::DtResource => "DT_RESOURCE",
DataType::DtVariant => "DT_VARIANT",
DataType::DtUint32 => "DT_UINT32",
DataType::DtUint64 => "DT_UINT64",
DataType::DtFloatRef => "DT_FLOAT_REF",
DataType::DtDoubleRef => "DT_DOUBLE_REF",
DataType::DtInt32Ref => "DT_INT32_REF",
DataType::DtUint8Ref => "DT_UINT8_REF",
DataType::DtInt16Ref => "DT_INT16_REF",
DataType::DtInt8Ref => "DT_INT8_REF",
DataType::DtStringRef => "DT_STRING_REF",
DataType::DtComplex64Ref => "DT_COMPLEX64_REF",
DataType::DtInt64Ref => "DT_INT64_REF",
DataType::DtBoolRef => "DT_BOOL_REF",
DataType::DtQint8Ref => "DT_QINT8_REF",
DataType::DtQuint8Ref => "DT_QUINT8_REF",
DataType::DtQint32Ref => "DT_QINT32_REF",
DataType::DtBfloat16Ref => "DT_BFLOAT16_REF",
DataType::DtQint16Ref => "DT_QINT16_REF",
DataType::DtQuint16Ref => "DT_QUINT16_REF",
DataType::DtUint16Ref => "DT_UINT16_REF",
DataType::DtComplex128Ref => "DT_COMPLEX128_REF",
DataType::DtHalfRef => "DT_HALF_REF",
DataType::DtResourceRef => "DT_RESOURCE_REF",
DataType::DtVariantRef => "DT_VARIANT_REF",
DataType::DtUint32Ref => "DT_UINT32_REF",
DataType::DtUint64Ref => "DT_UINT64_REF",
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TensorProto {
#[prost(enumeration="DataType", tag="1")]
pub dtype: i32,
#[prost(message, optional, tag="2")]
pub tensor_shape: ::core::option::Option<TensorShapeProto>,
#[prost(int32, tag="3")]
pub version_number: i32,
#[prost(bytes="vec", tag="4")]
pub tensor_content: ::prost::alloc::vec::Vec<u8>,
#[prost(int32, repeated, tag="13")]
pub half_val: ::prost::alloc::vec::Vec<i32>,
#[prost(float, repeated, tag="5")]
pub float_val: ::prost::alloc::vec::Vec<f32>,
#[prost(double, repeated, tag="6")]
pub double_val: ::prost::alloc::vec::Vec<f64>,
#[prost(int32, repeated, tag="7")]
pub int_val: ::prost::alloc::vec::Vec<i32>,
#[prost(bytes="vec", repeated, tag="8")]
pub string_val: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
#[prost(float, repeated, tag="9")]
pub scomplex_val: ::prost::alloc::vec::Vec<f32>,
#[prost(int64, repeated, tag="10")]
pub int64_val: ::prost::alloc::vec::Vec<i64>,
#[prost(bool, repeated, tag="11")]
pub bool_val: ::prost::alloc::vec::Vec<bool>,
#[prost(double, repeated, tag="12")]
pub dcomplex_val: ::prost::alloc::vec::Vec<f64>,
#[prost(message, repeated, tag="14")]
pub resource_handle_val: ::prost::alloc::vec::Vec<ResourceHandleProto>,
#[prost(message, repeated, tag="15")]
pub variant_val: ::prost::alloc::vec::Vec<VariantTensorDataProto>,
#[prost(uint32, repeated, tag="16")]
pub uint32_val: ::prost::alloc::vec::Vec<u32>,
#[prost(uint64, repeated, tag="17")]
pub uint64_val: ::prost::alloc::vec::Vec<u64>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VariantTensorDataProto {
#[prost(string, tag="1")]
pub type_name: ::prost::alloc::string::String,
#[prost(bytes="vec", tag="2")]
pub metadata: ::prost::alloc::vec::Vec<u8>,
#[prost(message, repeated, tag="3")]
pub tensors: ::prost::alloc::vec::Vec<TensorProto>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AttrValue {
#[prost(oneof="attr_value::Value", tags="2, 3, 4, 5, 6, 7, 8, 1, 10, 9")]
pub value: ::core::option::Option<attr_value::Value>,
}
pub mod attr_value {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListValue {
#[prost(bytes="vec", repeated, tag="2")]
pub s: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
#[prost(int64, repeated, tag="3")]
pub i: ::prost::alloc::vec::Vec<i64>,
#[prost(float, repeated, tag="4")]
pub f: ::prost::alloc::vec::Vec<f32>,
#[prost(bool, repeated, tag="5")]
pub b: ::prost::alloc::vec::Vec<bool>,
#[prost(enumeration="super::DataType", repeated, tag="6")]
pub r#type: ::prost::alloc::vec::Vec<i32>,
#[prost(message, repeated, tag="7")]
pub shape: ::prost::alloc::vec::Vec<super::TensorShapeProto>,
#[prost(message, repeated, tag="8")]
pub tensor: ::prost::alloc::vec::Vec<super::TensorProto>,
#[prost(message, repeated, tag="9")]
pub func: ::prost::alloc::vec::Vec<super::NameAttrList>,
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Value {
#[prost(bytes, tag="2")]
S(::prost::alloc::vec::Vec<u8>),
#[prost(int64, tag="3")]
I(i64),
#[prost(float, tag="4")]
F(f32),
#[prost(bool, tag="5")]
B(bool),
#[prost(enumeration="super::DataType", tag="6")]
Type(i32),
#[prost(message, tag="7")]
Shape(super::TensorShapeProto),
#[prost(message, tag="8")]
Tensor(super::TensorProto),
#[prost(message, tag="1")]
List(ListValue),
#[prost(message, tag="10")]
Func(super::NameAttrList),
#[prost(string, tag="9")]
Placeholder(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NameAttrList {
#[prost(string, tag="1")]
pub name: ::prost::alloc::string::String,
#[prost(map="string, message", tag="2")]
pub attr: ::std::collections::HashMap<::prost::alloc::string::String, AttrValue>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NodeDef {
#[prost(string, tag="1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub op: ::prost::alloc::string::String,
#[prost(string, repeated, tag="3")]
pub input: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag="4")]
pub device: ::prost::alloc::string::String,
#[prost(map="string, message", tag="5")]
pub attr: ::std::collections::HashMap<::prost::alloc::string::String, AttrValue>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OpDef {
#[prost(string, tag="1")]
pub name: ::prost::alloc::string::String,
#[prost(message, repeated, tag="2")]
pub input_arg: ::prost::alloc::vec::Vec<op_def::ArgDef>,
#[prost(message, repeated, tag="3")]
pub output_arg: ::prost::alloc::vec::Vec<op_def::ArgDef>,
#[prost(message, repeated, tag="4")]
pub attr: ::prost::alloc::vec::Vec<op_def::AttrDef>,
#[prost(message, optional, tag="8")]
pub deprecation: ::core::option::Option<OpDeprecation>,
#[prost(string, tag="5")]
pub summary: ::prost::alloc::string::String,
#[prost(string, tag="6")]
pub description: ::prost::alloc::string::String,
#[prost(bool, tag="18")]
pub is_commutative: bool,
#[prost(bool, tag="16")]
pub is_aggregate: bool,
#[prost(bool, tag="17")]
pub is_stateful: bool,
#[prost(bool, tag="19")]
pub allows_uninitialized_input: bool,
}
pub mod op_def {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ArgDef {
#[prost(string, tag="1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub description: ::prost::alloc::string::String,
#[prost(enumeration="super::DataType", tag="3")]
pub r#type: i32,
#[prost(string, tag="4")]
pub type_attr: ::prost::alloc::string::String,
#[prost(string, tag="5")]
pub number_attr: ::prost::alloc::string::String,
#[prost(string, tag="6")]
pub type_list_attr: ::prost::alloc::string::String,
#[prost(bool, tag="16")]
pub is_ref: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AttrDef {
#[prost(string, tag="1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub r#type: ::prost::alloc::string::String,
#[prost(message, optional, tag="3")]
pub default_value: ::core::option::Option<super::AttrValue>,
#[prost(string, tag="4")]
pub description: ::prost::alloc::string::String,
#[prost(bool, tag="5")]
pub has_minimum: bool,
#[prost(int64, tag="6")]
pub minimum: i64,
#[prost(message, optional, tag="7")]
pub allowed_values: ::core::option::Option<super::AttrValue>,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OpDeprecation {
#[prost(int32, tag="1")]
pub version: i32,
#[prost(string, tag="2")]
pub explanation: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OpList {
#[prost(message, repeated, tag="1")]
pub op: ::prost::alloc::vec::Vec<OpDef>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FunctionDefLibrary {
#[prost(message, repeated, tag="1")]
pub function: ::prost::alloc::vec::Vec<FunctionDef>,
#[prost(message, repeated, tag="2")]
pub gradient: ::prost::alloc::vec::Vec<GradientDef>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FunctionDef {
#[prost(message, optional, tag="1")]
pub signature: ::core::option::Option<OpDef>,
#[prost(map="string, message", tag="5")]
pub attr: ::std::collections::HashMap<::prost::alloc::string::String, AttrValue>,
#[prost(message, repeated, tag="3")]
pub node_def: ::prost::alloc::vec::Vec<NodeDef>,
#[prost(map="string, string", tag="4")]
pub ret: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GradientDef {
#[prost(string, tag="1")]
pub function_name: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub gradient_func: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VersionDef {
#[prost(int32, tag="1")]
pub producer: i32,
#[prost(int32, tag="2")]
pub min_consumer: i32,
#[prost(int32, repeated, tag="3")]
pub bad_consumers: ::prost::alloc::vec::Vec<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GraphDef {
#[prost(message, repeated, tag="1")]
pub node: ::prost::alloc::vec::Vec<NodeDef>,
#[prost(message, optional, tag="4")]
pub versions: ::core::option::Option<VersionDef>,
#[deprecated]
#[prost(int32, tag="3")]
pub version: i32,
#[prost(message, optional, tag="2")]
pub library: ::core::option::Option<FunctionDefLibrary>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VariableDef {
#[prost(string, tag="1")]
pub variable_name: ::prost::alloc::string::String,
#[prost(string, tag="6")]
pub initial_value_name: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub initializer_name: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub snapshot_name: ::prost::alloc::string::String,
#[prost(message, optional, tag="4")]
pub save_slice_info_def: ::core::option::Option<SaveSliceInfoDef>,
#[prost(bool, tag="5")]
pub is_resource: bool,
#[prost(bool, tag="7")]
pub trainable: bool,
#[prost(enumeration="VariableSynchronization", tag="8")]
pub synchronization: i32,
#[prost(enumeration="VariableAggregation", tag="9")]
pub aggregation: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SaveSliceInfoDef {
#[prost(string, tag="1")]
pub full_name: ::prost::alloc::string::String,
#[prost(int64, repeated, tag="2")]
pub full_shape: ::prost::alloc::vec::Vec<i64>,
#[prost(int64, repeated, tag="3")]
pub var_offset: ::prost::alloc::vec::Vec<i64>,
#[prost(int64, repeated, tag="4")]
pub var_shape: ::prost::alloc::vec::Vec<i64>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum VariableSynchronization {
Auto = 0,
None = 1,
OnWrite = 2,
OnRead = 3,
}
impl VariableSynchronization {
pub fn as_str_name(&self) -> &'static str {
match self {
VariableSynchronization::Auto => "VARIABLE_SYNCHRONIZATION_AUTO",
VariableSynchronization::None => "VARIABLE_SYNCHRONIZATION_NONE",
VariableSynchronization::OnWrite => "VARIABLE_SYNCHRONIZATION_ON_WRITE",
VariableSynchronization::OnRead => "VARIABLE_SYNCHRONIZATION_ON_READ",
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum VariableAggregation {
None = 0,
Sum = 1,
Mean = 2,
OnlyFirstReplica = 3,
}
impl VariableAggregation {
pub fn as_str_name(&self) -> &'static str {
match self {
VariableAggregation::None => "VARIABLE_AGGREGATION_NONE",
VariableAggregation::Sum => "VARIABLE_AGGREGATION_SUM",
VariableAggregation::Mean => "VARIABLE_AGGREGATION_MEAN",
VariableAggregation::OnlyFirstReplica => "VARIABLE_AGGREGATION_ONLY_FIRST_REPLICA",
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TrackableObjectGraph {
#[prost(message, repeated, tag="1")]
pub nodes: ::prost::alloc::vec::Vec<trackable_object_graph::TrackableObject>,
}
pub mod trackable_object_graph {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TrackableObject {
#[prost(message, repeated, tag="1")]
pub children: ::prost::alloc::vec::Vec<trackable_object::ObjectReference>,
#[prost(message, repeated, tag="2")]
pub attributes: ::prost::alloc::vec::Vec<trackable_object::SerializedTensor>,
#[prost(message, repeated, tag="3")]
pub slot_variables: ::prost::alloc::vec::Vec<trackable_object::SlotVariableReference>,
}
pub mod trackable_object {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ObjectReference {
#[prost(int32, tag="1")]
pub node_id: i32,
#[prost(string, tag="2")]
pub local_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SerializedTensor {
#[prost(string, tag="1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub full_name: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub checkpoint_key: ::prost::alloc::string::String,
#[prost(bool, tag="4")]
pub optional_restore: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SlotVariableReference {
#[prost(int32, tag="1")]
pub original_variable_node_id: i32,
#[prost(string, tag="2")]
pub slot_name: ::prost::alloc::string::String,
#[prost(int32, tag="3")]
pub slot_variable_node_id: i32,
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StructuredValue {
#[prost(oneof="structured_value::Kind", tags="1, 11, 12, 13, 14, 31, 32, 33, 34, 51, 52, 53, 54")]
pub kind: ::core::option::Option<structured_value::Kind>,
}
pub mod structured_value {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Kind {
#[prost(message, tag="1")]
NoneValue(super::NoneValue),
#[prost(double, tag="11")]
Float64Value(f64),
#[prost(sint64, tag="12")]
Int64Value(i64),
#[prost(string, tag="13")]
StringValue(::prost::alloc::string::String),
#[prost(bool, tag="14")]
BoolValue(bool),
#[prost(message, tag="31")]
TensorShapeValue(super::TensorShapeProto),
#[prost(enumeration="super::DataType", tag="32")]
TensorDtypeValue(i32),
#[prost(message, tag="33")]
TensorSpecValue(super::TensorSpecProto),
#[prost(message, tag="34")]
TypeSpecValue(::prost::alloc::boxed::Box<super::TypeSpecProto>),
#[prost(message, tag="51")]
ListValue(super::ListValue),
#[prost(message, tag="52")]
TupleValue(super::TupleValue),
#[prost(message, tag="53")]
DictValue(super::DictValue),
#[prost(message, tag="54")]
NamedTupleValue(super::NamedTupleValue),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NoneValue {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListValue {
#[prost(message, repeated, tag="1")]
pub values: ::prost::alloc::vec::Vec<StructuredValue>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TupleValue {
#[prost(message, repeated, tag="1")]
pub values: ::prost::alloc::vec::Vec<StructuredValue>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DictValue {
#[prost(map="string, message", tag="1")]
pub fields: ::std::collections::HashMap<::prost::alloc::string::String, StructuredValue>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PairValue {
#[prost(string, tag="1")]
pub key: ::prost::alloc::string::String,
#[prost(message, optional, tag="2")]
pub value: ::core::option::Option<StructuredValue>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NamedTupleValue {
#[prost(string, tag="1")]
pub name: ::prost::alloc::string::String,
#[prost(message, repeated, tag="2")]
pub values: ::prost::alloc::vec::Vec<PairValue>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TensorSpecProto {
#[prost(string, tag="1")]
pub name: ::prost::alloc::string::String,
#[prost(message, optional, tag="2")]
pub shape: ::core::option::Option<TensorShapeProto>,
#[prost(enumeration="DataType", tag="3")]
pub dtype: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TypeSpecProto {
#[prost(enumeration="type_spec_proto::TypeSpecClass", tag="1")]
pub type_spec_class: i32,
#[prost(message, optional, boxed, tag="2")]
pub type_state: ::core::option::Option<::prost::alloc::boxed::Box<StructuredValue>>,
#[prost(string, tag="3")]
pub type_spec_class_name: ::prost::alloc::string::String,
}
pub mod type_spec_proto {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TypeSpecClass {
Unknown = 0,
SparseTensorSpec = 1,
IndexedSlicesSpec = 2,
RaggedTensorSpec = 3,
TensorArraySpec = 4,
DataDatasetSpec = 5,
DataIteratorSpec = 6,
OptionalSpec = 7,
PerReplicaSpec = 8,
VariableSpec = 9,
}
impl TypeSpecClass {
pub fn as_str_name(&self) -> &'static str {
match self {
TypeSpecClass::Unknown => "UNKNOWN",
TypeSpecClass::SparseTensorSpec => "SPARSE_TENSOR_SPEC",
TypeSpecClass::IndexedSlicesSpec => "INDEXED_SLICES_SPEC",
TypeSpecClass::RaggedTensorSpec => "RAGGED_TENSOR_SPEC",
TypeSpecClass::TensorArraySpec => "TENSOR_ARRAY_SPEC",
TypeSpecClass::DataDatasetSpec => "DATA_DATASET_SPEC",
TypeSpecClass::DataIteratorSpec => "DATA_ITERATOR_SPEC",
TypeSpecClass::OptionalSpec => "OPTIONAL_SPEC",
TypeSpecClass::PerReplicaSpec => "PER_REPLICA_SPEC",
TypeSpecClass::VariableSpec => "VARIABLE_SPEC",
}
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SavedObjectGraph {
#[prost(message, repeated, tag="1")]
pub nodes: ::prost::alloc::vec::Vec<SavedObject>,
#[prost(map="string, message", tag="2")]
pub concrete_functions: ::std::collections::HashMap<::prost::alloc::string::String, SavedConcreteFunction>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SavedObject {
#[prost(message, repeated, tag="1")]
pub children: ::prost::alloc::vec::Vec<trackable_object_graph::trackable_object::ObjectReference>,
#[prost(message, repeated, tag="3")]
pub slot_variables: ::prost::alloc::vec::Vec<trackable_object_graph::trackable_object::SlotVariableReference>,
#[prost(oneof="saved_object::Kind", tags="4, 5, 6, 7, 8, 9, 10")]
pub kind: ::core::option::Option<saved_object::Kind>,
}
pub mod saved_object {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Kind {
#[prost(message, tag="4")]
UserObject(super::SavedUserObject),
#[prost(message, tag="5")]
Asset(super::SavedAsset),
#[prost(message, tag="6")]
Function(super::SavedFunction),
#[prost(message, tag="7")]
Variable(super::SavedVariable),
#[prost(message, tag="8")]
BareConcreteFunction(super::SavedBareConcreteFunction),
#[prost(message, tag="9")]
Constant(super::SavedConstant),
#[prost(message, tag="10")]
Resource(super::SavedResource),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SavedUserObject {
#[prost(string, tag="1")]
pub identifier: ::prost::alloc::string::String,
#[prost(message, optional, tag="2")]
pub version: ::core::option::Option<VersionDef>,
#[prost(string, tag="3")]
pub metadata: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SavedAsset {
#[prost(int32, tag="1")]
pub asset_file_def_index: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SavedFunction {
#[prost(string, repeated, tag="1")]
pub concrete_functions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, optional, tag="2")]
pub function_spec: ::core::option::Option<FunctionSpec>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SavedConcreteFunction {
#[prost(int32, repeated, tag="2")]
pub bound_inputs: ::prost::alloc::vec::Vec<i32>,
#[prost(message, optional, tag="3")]
pub canonicalized_input_signature: ::core::option::Option<StructuredValue>,
#[prost(message, optional, tag="4")]
pub output_signature: ::core::option::Option<StructuredValue>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SavedBareConcreteFunction {
#[prost(string, tag="1")]
pub concrete_function_name: ::prost::alloc::string::String,
#[prost(string, repeated, tag="2")]
pub argument_keywords: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(int64, tag="3")]
pub allowed_positional_arguments: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SavedConstant {
#[prost(string, tag="1")]
pub operation: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SavedVariable {
#[prost(enumeration="DataType", tag="1")]
pub dtype: i32,
#[prost(message, optional, tag="2")]
pub shape: ::core::option::Option<TensorShapeProto>,
#[prost(bool, tag="3")]
pub trainable: bool,
#[prost(enumeration="VariableSynchronization", tag="4")]
pub synchronization: i32,
#[prost(enumeration="VariableAggregation", tag="5")]
pub aggregation: i32,
#[prost(string, tag="6")]
pub name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FunctionSpec {
#[prost(message, optional, tag="1")]
pub fullargspec: ::core::option::Option<StructuredValue>,
#[prost(bool, tag="2")]
pub is_method: bool,
#[prost(message, optional, tag="5")]
pub input_signature: ::core::option::Option<StructuredValue>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SavedResource {
#[prost(string, tag="1")]
pub device: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SaverDef {
#[prost(string, tag="1")]
pub filename_tensor_name: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub save_tensor_name: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub restore_op_name: ::prost::alloc::string::String,
#[prost(int32, tag="4")]
pub max_to_keep: i32,
#[prost(bool, tag="5")]
pub sharded: bool,
#[prost(float, tag="6")]
pub keep_checkpoint_every_n_hours: f32,
#[prost(enumeration="saver_def::CheckpointFormatVersion", tag="7")]
pub version: i32,
}
pub mod saver_def {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum CheckpointFormatVersion {
Legacy = 0,
V1 = 1,
V2 = 2,
}
impl CheckpointFormatVersion {
pub fn as_str_name(&self) -> &'static str {
match self {
CheckpointFormatVersion::Legacy => "LEGACY",
CheckpointFormatVersion::V1 => "V1",
CheckpointFormatVersion::V2 => "V2",
}
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MetaGraphDef {
#[prost(message, optional, tag="1")]
pub meta_info_def: ::core::option::Option<meta_graph_def::MetaInfoDef>,
#[prost(message, optional, tag="2")]
pub graph_def: ::core::option::Option<GraphDef>,
#[prost(message, optional, tag="3")]
pub saver_def: ::core::option::Option<SaverDef>,
#[prost(map="string, message", tag="4")]
pub collection_def: ::std::collections::HashMap<::prost::alloc::string::String, CollectionDef>,
#[prost(map="string, message", tag="5")]
pub signature_def: ::std::collections::HashMap<::prost::alloc::string::String, SignatureDef>,
#[prost(message, repeated, tag="6")]
pub asset_file_def: ::prost::alloc::vec::Vec<AssetFileDef>,
#[prost(message, optional, tag="7")]
pub object_graph_def: ::core::option::Option<SavedObjectGraph>,
}
pub mod meta_graph_def {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MetaInfoDef {
#[prost(string, tag="1")]
pub meta_graph_version: ::prost::alloc::string::String,
#[prost(message, optional, tag="2")]
pub stripped_op_list: ::core::option::Option<super::OpList>,
#[prost(message, optional, tag="3")]
pub any_info: ::core::option::Option<::prost_types::Any>,
#[prost(string, repeated, tag="4")]
pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag="5")]
pub tensorflow_version: ::prost::alloc::string::String,
#[prost(string, tag="6")]
pub tensorflow_git_version: ::prost::alloc::string::String,
#[prost(bool, tag="7")]
pub stripped_default_attrs: bool,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CollectionDef {
#[prost(oneof="collection_def::Kind", tags="1, 2, 3, 4, 5")]
pub kind: ::core::option::Option<collection_def::Kind>,
}
pub mod collection_def {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NodeList {
#[prost(string, repeated, tag="1")]
pub value: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BytesList {
#[prost(bytes="vec", repeated, tag="1")]
pub value: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Int64List {
#[prost(int64, repeated, tag="1")]
pub value: ::prost::alloc::vec::Vec<i64>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FloatList {
#[prost(float, repeated, tag="1")]
pub value: ::prost::alloc::vec::Vec<f32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AnyList {
#[prost(message, repeated, tag="1")]
pub value: ::prost::alloc::vec::Vec<::prost_types::Any>,
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Kind {
#[prost(message, tag="1")]
NodeList(NodeList),
#[prost(message, tag="2")]
BytesList(BytesList),
#[prost(message, tag="3")]
Int64List(Int64List),
#[prost(message, tag="4")]
FloatList(FloatList),
#[prost(message, tag="5")]
AnyList(AnyList),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TensorInfo {
#[prost(enumeration="DataType", tag="2")]
pub dtype: i32,
#[prost(message, optional, tag="3")]
pub tensor_shape: ::core::option::Option<TensorShapeProto>,
#[prost(oneof="tensor_info::Encoding", tags="1, 4, 5")]
pub encoding: ::core::option::Option<tensor_info::Encoding>,
}
pub mod tensor_info {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CooSparse {
#[prost(string, tag="1")]
pub values_tensor_name: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub indices_tensor_name: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub dense_shape_tensor_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CompositeTensor {
#[prost(message, optional, tag="1")]
pub type_spec: ::core::option::Option<super::TypeSpecProto>,
#[prost(message, repeated, tag="2")]
pub components: ::prost::alloc::vec::Vec<super::TensorInfo>,
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Encoding {
#[prost(string, tag="1")]
Name(::prost::alloc::string::String),
#[prost(message, tag="4")]
CooSparse(CooSparse),
#[prost(message, tag="5")]
CompositeTensor(CompositeTensor),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SignatureDef {
#[prost(map="string, message", tag="1")]
pub inputs: ::std::collections::HashMap<::prost::alloc::string::String, TensorInfo>,
#[prost(map="string, message", tag="2")]
pub outputs: ::std::collections::HashMap<::prost::alloc::string::String, TensorInfo>,
#[prost(string, tag="3")]
pub method_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AssetFileDef {
#[prost(message, optional, tag="1")]
pub tensor_info: ::core::option::Option<TensorInfo>,
#[prost(string, tag="2")]
pub filename: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SavedModel {
#[prost(int64, tag="1")]
pub saved_model_schema_version: i64,
#[prost(message, repeated, tag="2")]
pub meta_graphs: ::prost::alloc::vec::Vec<MetaGraphDef>,
}