From 71fef9ac14a7414df27722feb03d091a0bb2830e Mon Sep 17 00:00:00 2001 From: Oceania2018 Date: Tue, 10 Mar 2020 17:08:46 -0500 Subject: [PATCH] regenerate protobufs. --- src/TensorFlowNET.Core/Binding.Util.cs | 5 +- src/TensorFlowNET.Core/Eager/c_api.eager.cs | 14 + .../Eager/pywrap_tfe_src.cs | 99 +- .../Operations/gen_array_ops.cs | 1 + .../Operations/gen_math_ops.cs | 12 +- .../Protobuf/AllocationDescription.cs | 4 +- src/TensorFlowNET.Core/Protobuf/ApiDef.cs | 28 +- src/TensorFlowNET.Core/Protobuf/AttrValue.cs | 10 +- .../Protobuf/CheckpointState.cs | 21 +- src/TensorFlowNET.Core/Protobuf/Cluster.cs | 8 +- src/TensorFlowNET.Core/Protobuf/Config.cs | 718 ++++- .../Protobuf/ControlFlow.cs | 24 +- src/TensorFlowNET.Core/Protobuf/CostGraph.cs | 24 +- src/TensorFlowNET.Core/Protobuf/Debug.cs | 20 +- .../Protobuf/DeviceAttributes.cs | 22 +- src/TensorFlowNET.Core/Protobuf/Event.cs | 248 +- src/TensorFlowNET.Core/Protobuf/Function.cs | 225 +- src/TensorFlowNET.Core/Protobuf/Gen.bat | 2 +- src/TensorFlowNET.Core/Protobuf/Graph.cs | 16 +- .../Protobuf/GraphTransferInfo.cs | 66 +- src/TensorFlowNET.Core/Protobuf/KernelDef.cs | 12 +- src/TensorFlowNET.Core/Protobuf/LogMemory.cs | 26 +- src/TensorFlowNET.Core/Protobuf/MetaGraph.cs | 414 ++- src/TensorFlowNET.Core/Protobuf/NodeDef.cs | 54 +- src/TensorFlowNET.Core/Protobuf/OpDef.cs | 106 +- .../Protobuf/ResourceHandle.cs | 220 +- .../Protobuf/RewriterConfig.cs | 420 ++- .../Protobuf/SavedObjectGraph.cs | 2365 +++++++++++++++++ src/TensorFlowNET.Core/Protobuf/Saver.cs | 42 +- src/TensorFlowNET.Core/Protobuf/StepStats.cs | 68 +- src/TensorFlowNET.Core/Protobuf/Struct.cs | 1990 ++++++++++++++ src/TensorFlowNET.Core/Protobuf/Summary.cs | 26 +- src/TensorFlowNET.Core/Protobuf/Tensor.cs | 24 +- .../Protobuf/TensorDescription.cs | 28 +- .../Protobuf/TensorShape.cs | 24 +- .../Protobuf/TensorSlice.cs | 4 +- .../Protobuf/TrackableObjectGraph.cs | 957 +++++++ src/TensorFlowNET.Core/Protobuf/Types.cs | 3 +- src/TensorFlowNET.Core/Protobuf/Variable.cs | 41 +- .../Protobuf/VerifierConfig.cs | 229 ++ src/TensorFlowNET.Core/Protobuf/Versions.cs | 4 +- .../TensorFlow.Binding.csproj | 11 + .../Tensors/Tensor.Value.cs | 2 + 43 files changed, 7884 insertions(+), 753 deletions(-) create mode 100644 src/TensorFlowNET.Core/Protobuf/SavedObjectGraph.cs create mode 100644 src/TensorFlowNET.Core/Protobuf/Struct.cs create mode 100644 src/TensorFlowNET.Core/Protobuf/TrackableObjectGraph.cs create mode 100644 src/TensorFlowNET.Core/Protobuf/VerifierConfig.cs diff --git a/src/TensorFlowNET.Core/Binding.Util.cs b/src/TensorFlowNET.Core/Binding.Util.cs index df818adb..75799e1b 100644 --- a/src/TensorFlowNET.Core/Binding.Util.cs +++ b/src/TensorFlowNET.Core/Binding.Util.cs @@ -80,7 +80,10 @@ namespace Tensorflow public static void print(string format, params object[] objects) { if (!format.Contains("{}")) - Console.WriteLine(format, string.Join(" ", objects.Select(x => x.ToString()))); + { + Console.WriteLine(format + " " + string.Join(" ", objects.Select(x => x.ToString()))); + return; + } foreach(var obj in objects) { diff --git a/src/TensorFlowNET.Core/Eager/c_api.eager.cs b/src/TensorFlowNET.Core/Eager/c_api.eager.cs index 83610c94..2cd3a68c 100644 --- a/src/TensorFlowNET.Core/Eager/c_api.eager.cs +++ b/src/TensorFlowNET.Core/Eager/c_api.eager.cs @@ -20,6 +20,17 @@ namespace Tensorflow [DllImport(TensorFlowLibName)] public static extern void TFE_DeleteContextOptions(IntPtr options); + /// + /// + /// + /// TFE_Op* + /// const char* + /// unsigned char* + /// TF_Status* + /// + [DllImport(TensorFlowLibName)] + public static extern TF_AttrType TFE_OpGetAttrType(IntPtr op, string attr_name, ref byte is_list, IntPtr status); + /// /// Returns the length (number of tensors) of the input argument `input_name` /// found in the provided `op`. @@ -119,6 +130,9 @@ namespace Tensorflow [DllImport(TensorFlowLibName)] public static extern void TFE_OpSetAttrShape(IntPtr op, string attr_name, long[] dims, int num_dims, IntPtr out_status); + [DllImport(TensorFlowLibName)] + public static extern void TFE_OpSetAttrBool(IntPtr op, string attr_name, bool value); + /// /// /// diff --git a/src/TensorFlowNET.Core/Eager/pywrap_tfe_src.cs b/src/TensorFlowNET.Core/Eager/pywrap_tfe_src.cs index 0bcd5546..bf2ecb62 100644 --- a/src/TensorFlowNET.Core/Eager/pywrap_tfe_src.cs +++ b/src/TensorFlowNET.Core/Eager/pywrap_tfe_src.cs @@ -14,18 +14,36 @@ namespace Tensorflow.Eager string device_name, string opName, string name, - params object[] inputs) + Action callbacks, + params object[] args) { + int args_size = args.Length; IntPtr op = IntPtr.Zero; - var attr_list_sizes = new Dictionary(); + var attr_list_sizes = new Dictionary(); using (var status = new Status()) { op = c_api.TFE_NewOp(ctx, opName, status); var op_def = Graph.TFE_GetOpDef(opName); - // SetOpAttrWithDefaults - c_api.TFE_OpSetDevice(op, "", status); + // Set non-inferred attrs, including setting defaults if the attr is passed in + // as None. + for (int i = op_def.InputArg.Count; i < args_size; i += 2) + { + var attr_name = args[i].ToString(); + var attr_value = args[i + 1]; + + foreach(var attr in op_def.Attr) + { + if(attr_name == attr.Name) + { + SetOpAttrWithDefaults(ctx, op, attr, attr_name, attr_value, attr_list_sizes, status); + break; + } + } + } + + c_api.TFE_OpSetDevice(op, device_name, status); for (int i = 0; i < op_def.InputArg.Count; i++) { @@ -42,7 +60,7 @@ namespace Tensorflow.Eager else { // The item is a single item. - switch (inputs[i]) + switch (args[i]) { case Tensor inputTensor: AddInputToOp(inputTensor, true, input_arg, op, status); @@ -57,18 +75,19 @@ namespace Tensorflow.Eager for (int i = 0; i < op_def.OutputArg.Count; i++) { var output_arg = op_def.OutputArg[i]; - var delta = 1; + var delta = 1L; if (!string.IsNullOrEmpty(output_arg.NumberAttr)) delta = attr_list_sizes[output_arg.NumberAttr]; else if (!string.IsNullOrEmpty(output_arg.TypeListAttr)) delta = attr_list_sizes[output_arg.TypeListAttr]; if(delta < 0) throw new RuntimeError("Attributes suggest that the size of an output list is less than 0"); - num_retvals += delta; + num_retvals += (int)delta; } var retVals = new IntPtr[num_retvals]; c_api.TFE_Execute(op, retVals, ref num_retvals, status); + status.Check(true); var t = c_api.TFE_TensorHandleResolve(retVals[0], status); status.Check(true); @@ -106,6 +125,72 @@ namespace Tensorflow.Eager return true; } + /// + /// This function will set the op attrs required. If an attr has the value of + /// None, then it will read the AttrDef to get the default value and set that + /// instead. Any failure in this function will simply fall back to the slow + /// path. + /// + /// + /// + /// + /// + /// + /// + /// + private static void SetOpAttrWithDefaults(Context ctx, IntPtr op, AttrDef attr, + string attr_name, object attr_value, + Dictionary attr_list_sizes, + Status status) + { + byte is_list = 0; + var type = c_api.TFE_OpGetAttrType(op, attr_name, ref is_list, status); + if (status.Code != TF_Code.TF_OK) return; + + if(attr_value == null) + { + if (is_list != 0) + ; + //SetOpAttrListDefault + else + ; + //SetOpAttrScalarDefault + } + else + { + if (is_list != 0) + ;// SetOpAttrList + else + SetOpAttrScalar(ctx, op, attr_name, attr_value, type, attr_list_sizes, status); + } + } + + private static bool SetOpAttrScalar(Context ctx, IntPtr op, + string key, object value, TF_AttrType type, + Dictionary attr_list_sizes, + Status status) + { + switch(type) + { + case TF_AttrType.TF_ATTR_STRING: + c_api.TFE_OpSetAttrString(op, key, value.ToString(), (uint)value.ToString().Length); + break; + case TF_AttrType.TF_ATTR_TYPE: + c_api.TFE_OpSetAttrType(op, key, (TF_DataType)value); + break; + case TF_AttrType.TF_ATTR_BOOL: + c_api.TFE_OpSetAttrBool(op, key, Convert.ToBoolean(value)); + break; + case TF_AttrType.TF_ATTR_INT: + c_api.TFE_OpSetAttrInt(op, key, Convert.ToInt64(value)); + break; + default: + throw new NotImplementedException(""); + } + + return true; + } + public static void RecordGradient(string op_name, Tensor[] inputs, Dictionary attrs, Tensor[] results, string name = null) { var input_ids = inputs.Select(x => x.Id).ToArray(); diff --git a/src/TensorFlowNET.Core/Operations/gen_array_ops.cs b/src/TensorFlowNET.Core/Operations/gen_array_ops.cs index e4f9cc92..ad7013dd 100644 --- a/src/TensorFlowNET.Core/Operations/gen_array_ops.cs +++ b/src/TensorFlowNET.Core/Operations/gen_array_ops.cs @@ -17,6 +17,7 @@ using NumSharp; using System; using System.Collections.Generic; +using static Tensorflow.Binding; using Tensorflow.Eager; namespace Tensorflow diff --git a/src/TensorFlowNET.Core/Operations/gen_math_ops.cs b/src/TensorFlowNET.Core/Operations/gen_math_ops.cs index 8f622080..b08e4f0c 100644 --- a/src/TensorFlowNET.Core/Operations/gen_math_ops.cs +++ b/src/TensorFlowNET.Core/Operations/gen_math_ops.cs @@ -144,7 +144,7 @@ namespace Tensorflow { if (tf.context.executing_eagerly()) { - var _result = pywrap_tfe_src.TFE_Py_FastPathExecute(tf.context, "", "Add", name, x, y); + var _result = pywrap_tfe_src.TFE_Py_FastPathExecute(tf.context, "", "Add", name, null, x, y); return _result; } @@ -466,7 +466,7 @@ namespace Tensorflow { if (tf.context.executing_eagerly()) { - var _result = pywrap_tfe_src.TFE_Py_FastPathExecute(tf.context, "", "Cast", name, x, "DstT", DstT, "Truncate", Truncate); + var _result = pywrap_tfe_src.TFE_Py_FastPathExecute(tf.context, "", "Cast", name, null, x, "DstT", DstT, "Truncate", Truncate); return _result; } @@ -493,7 +493,7 @@ namespace Tensorflow { if (tf.context.executing_eagerly()) { - var _result = pywrap_tfe_src.TFE_Py_FastPathExecute(tf.context, "", "Sub", name, x, y); + var _result = pywrap_tfe_src.TFE_Py_FastPathExecute(tf.context, "", "Sub", name, null, x, y); return _result; } @@ -544,7 +544,7 @@ namespace Tensorflow { if (tf.context.executing_eagerly()) { - var _result = pywrap_tfe_src.TFE_Py_FastPathExecute(tf.context, "", "Mul", name, x, y); + var _result = pywrap_tfe_src.TFE_Py_FastPathExecute(tf.context, "", "Mul", name, null, x, y); return _result; } @@ -564,7 +564,7 @@ namespace Tensorflow { if (tf.context.executing_eagerly()) { - var _result = pywrap_tfe_src.TFE_Py_FastPathExecute(tf.context, "", "RealDiv", name, x, y); + var _result = pywrap_tfe_src.TFE_Py_FastPathExecute(tf.context, "", "RealDiv", name, null, x, y); return _result; } @@ -591,7 +591,7 @@ namespace Tensorflow { if (tf.context.executing_eagerly()) { - var _result = pywrap_tfe_src.TFE_Py_FastPathExecute(tf.context, "", "FloorDiv", name, x, y); + var _result = pywrap_tfe_src.TFE_Py_FastPathExecute(tf.context, "", "FloorDiv", name, null, x, y); return _result; } diff --git a/src/TensorFlowNET.Core/Protobuf/AllocationDescription.cs b/src/TensorFlowNET.Core/Protobuf/AllocationDescription.cs index f763af75..c8c6b8b0 100644 --- a/src/TensorFlowNET.Core/Protobuf/AllocationDescription.cs +++ b/src/TensorFlowNET.Core/Protobuf/AllocationDescription.cs @@ -35,8 +35,8 @@ namespace Tensorflow { "BnByb3RvMw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, - new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.AllocationDescription), global::Tensorflow.AllocationDescription.Parser, new[]{ "RequestedBytes", "AllocatedBytes", "AllocatorName", "AllocationId", "HasSingleReference", "Ptr" }, null, null, null) + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.AllocationDescription), global::Tensorflow.AllocationDescription.Parser, new[]{ "RequestedBytes", "AllocatedBytes", "AllocatorName", "AllocationId", "HasSingleReference", "Ptr" }, null, null, null, null) })); } #endregion diff --git a/src/TensorFlowNET.Core/Protobuf/ApiDef.cs b/src/TensorFlowNET.Core/Protobuf/ApiDef.cs index fde35487..ef6f1f75 100644 --- a/src/TensorFlowNET.Core/Protobuf/ApiDef.cs +++ b/src/TensorFlowNET.Core/Protobuf/ApiDef.cs @@ -49,11 +49,11 @@ namespace Tensorflow { "YgZwcm90bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Tensorflow.AttrValueReflection.Descriptor, }, - new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.ApiDef), global::Tensorflow.ApiDef.Parser, new[]{ "GraphOpName", "DeprecationMessage", "DeprecationVersion", "Visibility", "Endpoint", "InArg", "OutArg", "ArgOrder", "Attr", "Summary", "Description", "DescriptionPrefix", "DescriptionSuffix" }, null, new[]{ typeof(global::Tensorflow.ApiDef.Types.Visibility) }, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.ApiDef.Types.Endpoint), global::Tensorflow.ApiDef.Types.Endpoint.Parser, new[]{ "Name", "Deprecated", "DeprecationVersion" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.ApiDef.Types.Arg), global::Tensorflow.ApiDef.Types.Arg.Parser, new[]{ "Name", "RenameTo", "Description" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.ApiDef.Types.Attr), global::Tensorflow.ApiDef.Types.Attr.Parser, new[]{ "Name", "RenameTo", "DefaultValue", "Description" }, null, null, null)}), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.ApiDefs), global::Tensorflow.ApiDefs.Parser, new[]{ "Op" }, null, null, null) + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.ApiDef), global::Tensorflow.ApiDef.Parser, new[]{ "GraphOpName", "DeprecationMessage", "DeprecationVersion", "Visibility", "Endpoint", "InArg", "OutArg", "ArgOrder", "Attr", "Summary", "Description", "DescriptionPrefix", "DescriptionSuffix" }, null, new[]{ typeof(global::Tensorflow.ApiDef.Types.Visibility) }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.ApiDef.Types.Endpoint), global::Tensorflow.ApiDef.Types.Endpoint.Parser, new[]{ "Name", "Deprecated", "DeprecationVersion" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.ApiDef.Types.Arg), global::Tensorflow.ApiDef.Types.Arg.Parser, new[]{ "Name", "RenameTo", "Description" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.ApiDef.Types.Attr), global::Tensorflow.ApiDef.Types.Attr.Parser, new[]{ "Name", "RenameTo", "DefaultValue", "Description" }, null, null, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.ApiDefs), global::Tensorflow.ApiDefs.Parser, new[]{ "Op" }, null, null, null, null) })); } #endregion @@ -172,7 +172,7 @@ namespace Tensorflow { /// Field number for the "visibility" field. public const int VisibilityFieldNumber = 2; - private global::Tensorflow.ApiDef.Types.Visibility visibility_ = 0; + private global::Tensorflow.ApiDef.Types.Visibility visibility_ = global::Tensorflow.ApiDef.Types.Visibility.DefaultVisibility; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public global::Tensorflow.ApiDef.Types.Visibility Visibility { get { return visibility_; } @@ -325,7 +325,7 @@ namespace Tensorflow { if (GraphOpName.Length != 0) hash ^= GraphOpName.GetHashCode(); if (DeprecationMessage.Length != 0) hash ^= DeprecationMessage.GetHashCode(); if (DeprecationVersion != 0) hash ^= DeprecationVersion.GetHashCode(); - if (Visibility != 0) hash ^= Visibility.GetHashCode(); + if (Visibility != global::Tensorflow.ApiDef.Types.Visibility.DefaultVisibility) hash ^= Visibility.GetHashCode(); hash ^= endpoint_.GetHashCode(); hash ^= inArg_.GetHashCode(); hash ^= outArg_.GetHashCode(); @@ -352,7 +352,7 @@ namespace Tensorflow { output.WriteRawTag(10); output.WriteString(GraphOpName); } - if (Visibility != 0) { + if (Visibility != global::Tensorflow.ApiDef.Types.Visibility.DefaultVisibility) { output.WriteRawTag(16); output.WriteEnum((int) Visibility); } @@ -402,7 +402,7 @@ namespace Tensorflow { if (DeprecationVersion != 0) { size += 1 + pb::CodedOutputStream.ComputeInt32Size(DeprecationVersion); } - if (Visibility != 0) { + if (Visibility != global::Tensorflow.ApiDef.Types.Visibility.DefaultVisibility) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Visibility); } size += endpoint_.CalculateSize(_repeated_endpoint_codec); @@ -442,7 +442,7 @@ namespace Tensorflow { if (other.DeprecationVersion != 0) { DeprecationVersion = other.DeprecationVersion; } - if (other.Visibility != 0) { + if (other.Visibility != global::Tensorflow.ApiDef.Types.Visibility.DefaultVisibility) { Visibility = other.Visibility; } endpoint_.Add(other.endpoint_); @@ -478,7 +478,7 @@ namespace Tensorflow { break; } case 16: { - visibility_ = (global::Tensorflow.ApiDef.Types.Visibility) input.ReadEnum(); + Visibility = (global::Tensorflow.ApiDef.Types.Visibility) input.ReadEnum(); break; } case 26: { @@ -1152,7 +1152,7 @@ namespace Tensorflow { } if (other.defaultValue_ != null) { if (defaultValue_ == null) { - defaultValue_ = new global::Tensorflow.AttrValue(); + DefaultValue = new global::Tensorflow.AttrValue(); } DefaultValue.MergeFrom(other.DefaultValue); } @@ -1180,9 +1180,9 @@ namespace Tensorflow { } case 26: { if (defaultValue_ == null) { - defaultValue_ = new global::Tensorflow.AttrValue(); + DefaultValue = new global::Tensorflow.AttrValue(); } - input.ReadMessage(defaultValue_); + input.ReadMessage(DefaultValue); break; } case 34: { diff --git a/src/TensorFlowNET.Core/Protobuf/AttrValue.cs b/src/TensorFlowNET.Core/Protobuf/AttrValue.cs index 24debee1..744862f0 100644 --- a/src/TensorFlowNET.Core/Protobuf/AttrValue.cs +++ b/src/TensorFlowNET.Core/Protobuf/AttrValue.cs @@ -49,9 +49,9 @@ namespace Tensorflow { "b3Jr+AEBYgZwcm90bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Tensorflow.TensorReflection.Descriptor, global::Tensorflow.TensorShapeReflection.Descriptor, global::Tensorflow.TypesReflection.Descriptor, }, - new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.AttrValue), global::Tensorflow.AttrValue.Parser, new[]{ "S", "I", "F", "B", "Type", "Shape", "Tensor", "List", "Func", "Placeholder" }, new[]{ "Value" }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.AttrValue.Types.ListValue), global::Tensorflow.AttrValue.Types.ListValue.Parser, new[]{ "S", "I", "F", "B", "Type", "Shape", "Tensor", "Func" }, null, null, null)}), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.NameAttrList), global::Tensorflow.NameAttrList.Parser, new[]{ "Name", "Attr" }, null, null, new pbr::GeneratedClrTypeInfo[] { null, }) + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.AttrValue), global::Tensorflow.AttrValue.Parser, new[]{ "S", "I", "F", "B", "Type", "Shape", "Tensor", "List", "Func", "Placeholder" }, new[]{ "Value" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.AttrValue.Types.ListValue), global::Tensorflow.AttrValue.Types.ListValue.Parser, new[]{ "S", "I", "F", "B", "Type", "Shape", "Tensor", "Func" }, null, null, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.NameAttrList), global::Tensorflow.NameAttrList.Parser, new[]{ "Name", "Attr" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, }) })); } #endregion @@ -192,7 +192,7 @@ namespace Tensorflow { /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public global::Tensorflow.DataType Type { - get { return valueCase_ == ValueOneofCase.Type ? (global::Tensorflow.DataType) value_ : 0; } + get { return valueCase_ == ValueOneofCase.Type ? (global::Tensorflow.DataType) value_ : global::Tensorflow.DataType.DtInvalid; } set { value_ = value; valueCase_ = ValueOneofCase.Type; @@ -923,7 +923,7 @@ namespace Tensorflow { /// Field number for the "attr" field. public const int AttrFieldNumber = 2; private static readonly pbc::MapField.Codec _map_attr_codec - = new pbc::MapField.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForMessage(18, global::Tensorflow.AttrValue.Parser), 18); + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForMessage(18, global::Tensorflow.AttrValue.Parser), 18); private readonly pbc::MapField attr_ = new pbc::MapField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public pbc::MapField Attr { diff --git a/src/TensorFlowNET.Core/Protobuf/CheckpointState.cs b/src/TensorFlowNET.Core/Protobuf/CheckpointState.cs index 51151726..42cefa71 100644 --- a/src/TensorFlowNET.Core/Protobuf/CheckpointState.cs +++ b/src/TensorFlowNET.Core/Protobuf/CheckpointState.cs @@ -1,6 +1,6 @@ // // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: checkpoint_state.proto +// source: tensorflow/python/training/checkpoint_state.proto // #pragma warning disable 1591, 0612, 3021 #region Designer generated code @@ -11,11 +11,11 @@ using pbr = global::Google.Protobuf.Reflection; using scg = global::System.Collections.Generic; namespace Tensorflow { - /// Holder for reflection information generated from checkpoint_state.proto + /// Holder for reflection information generated from tensorflow/python/training/checkpoint_state.proto public static partial class CheckpointStateReflection { #region Descriptor - /// File descriptor for checkpoint_state.proto + /// File descriptor for tensorflow/python/training/checkpoint_state.proto public static pbr::FileDescriptor Descriptor { get { return descriptor; } } @@ -24,15 +24,16 @@ namespace Tensorflow { static CheckpointStateReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( - "ChZjaGVja3BvaW50X3N0YXRlLnByb3RvEgp0ZW5zb3JmbG93Ip8BCg9DaGVj", - "a3BvaW50U3RhdGUSHQoVbW9kZWxfY2hlY2twb2ludF9wYXRoGAEgASgJEiIK", - "GmFsbF9tb2RlbF9jaGVja3BvaW50X3BhdGhzGAIgAygJEicKH2FsbF9tb2Rl", - "bF9jaGVja3BvaW50X3RpbWVzdGFtcHMYAyADKAESIAoYbGFzdF9wcmVzZXJ2", - "ZWRfdGltZXN0YW1wGAQgASgBQgP4AQFiBnByb3RvMw==")); + "CjF0ZW5zb3JmbG93L3B5dGhvbi90cmFpbmluZy9jaGVja3BvaW50X3N0YXRl", + "LnByb3RvEgp0ZW5zb3JmbG93Ip8BCg9DaGVja3BvaW50U3RhdGUSHQoVbW9k", + "ZWxfY2hlY2twb2ludF9wYXRoGAEgASgJEiIKGmFsbF9tb2RlbF9jaGVja3Bv", + "aW50X3BhdGhzGAIgAygJEicKH2FsbF9tb2RlbF9jaGVja3BvaW50X3RpbWVz", + "dGFtcHMYAyADKAESIAoYbGFzdF9wcmVzZXJ2ZWRfdGltZXN0YW1wGAQgASgB", + "QgP4AQFiBnByb3RvMw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, - new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.CheckpointState), global::Tensorflow.CheckpointState.Parser, new[]{ "ModelCheckpointPath", "AllModelCheckpointPaths", "AllModelCheckpointTimestamps", "LastPreservedTimestamp" }, null, null, null) + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.CheckpointState), global::Tensorflow.CheckpointState.Parser, new[]{ "ModelCheckpointPath", "AllModelCheckpointPaths", "AllModelCheckpointTimestamps", "LastPreservedTimestamp" }, null, null, null, null) })); } #endregion diff --git a/src/TensorFlowNET.Core/Protobuf/Cluster.cs b/src/TensorFlowNET.Core/Protobuf/Cluster.cs index d36f7e23..27dae3d9 100644 --- a/src/TensorFlowNET.Core/Protobuf/Cluster.cs +++ b/src/TensorFlowNET.Core/Protobuf/Cluster.cs @@ -34,9 +34,9 @@ namespace Tensorflow { "L3Byb3RvYnVm+AEBYgZwcm90bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, - new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.JobDef), global::Tensorflow.JobDef.Parser, new[]{ "Name", "Tasks" }, null, null, new pbr::GeneratedClrTypeInfo[] { null, }), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.ClusterDef), global::Tensorflow.ClusterDef.Parser, new[]{ "Job" }, null, null, null) + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.JobDef), global::Tensorflow.JobDef.Parser, new[]{ "Name", "Tasks" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, }), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.ClusterDef), global::Tensorflow.ClusterDef.Parser, new[]{ "Job" }, null, null, null, null) })); } #endregion @@ -98,7 +98,7 @@ namespace Tensorflow { /// Field number for the "tasks" field. public const int TasksFieldNumber = 2; private static readonly pbc::MapField.Codec _map_tasks_codec - = new pbc::MapField.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForString(18), 18); + = new pbc::MapField.Codec(pb::FieldCodec.ForInt32(8, 0), pb::FieldCodec.ForString(18, ""), 18); private readonly pbc::MapField tasks_ = new pbc::MapField(); /// /// Mapping from task ID to "hostname:port" string. diff --git a/src/TensorFlowNET.Core/Protobuf/Config.cs b/src/TensorFlowNET.Core/Protobuf/Config.cs index be63c8c7..694a0aba 100644 --- a/src/TensorFlowNET.Core/Protobuf/Config.cs +++ b/src/TensorFlowNET.Core/Protobuf/Config.cs @@ -64,78 +64,88 @@ namespace Tensorflow { "EjMKD3Jld3JpdGVfb3B0aW9ucxgKIAEoCzIaLnRlbnNvcmZsb3cuUmV3cml0", "ZXJDb25maWdKBAgBEAJSJXNraXBfY29tbW9uX3N1YmV4cHJlc3Npb25fZWxp", "bWluYXRpb24iQQoVVGhyZWFkUG9vbE9wdGlvblByb3RvEhMKC251bV90aHJl", - "YWRzGAEgASgFEhMKC2dsb2JhbF9uYW1lGAIgASgJImwKClJQQ09wdGlvbnMS", - "JAocdXNlX3JwY19mb3JfaW5wcm9jZXNzX21hc3RlchgBIAEoCBIdChVjb21w", - "cmVzc2lvbl9hbGdvcml0aG0YAiABKAkSGQoRY29tcHJlc3Npb25fbGV2ZWwY", - "AyABKAUisggKC0NvbmZpZ1Byb3RvEj4KDGRldmljZV9jb3VudBgBIAMoCzIo", - "LnRlbnNvcmZsb3cuQ29uZmlnUHJvdG8uRGV2aWNlQ291bnRFbnRyeRIkChxp", - "bnRyYV9vcF9wYXJhbGxlbGlzbV90aHJlYWRzGAIgASgFEiQKHGludGVyX29w", - "X3BhcmFsbGVsaXNtX3RocmVhZHMYBSABKAUSHwoXdXNlX3Blcl9zZXNzaW9u", - "X3RocmVhZHMYCSABKAgSRwocc2Vzc2lvbl9pbnRlcl9vcF90aHJlYWRfcG9v", - "bBgMIAMoCzIhLnRlbnNvcmZsb3cuVGhyZWFkUG9vbE9wdGlvblByb3RvEhgK", - "EHBsYWNlbWVudF9wZXJpb2QYAyABKAUSFgoOZGV2aWNlX2ZpbHRlcnMYBCAD", - "KAkSKwoLZ3B1X29wdGlvbnMYBiABKAsyFi50ZW5zb3JmbG93LkdQVU9wdGlv", - "bnMSHAoUYWxsb3dfc29mdF9wbGFjZW1lbnQYByABKAgSHAoUbG9nX2Rldmlj", - "ZV9wbGFjZW1lbnQYCCABKAgSLwoNZ3JhcGhfb3B0aW9ucxgKIAEoCzIYLnRl", - "bnNvcmZsb3cuR3JhcGhPcHRpb25zEh8KF29wZXJhdGlvbl90aW1lb3V0X2lu", - "X21zGAsgASgDEisKC3JwY19vcHRpb25zGA0gASgLMhYudGVuc29yZmxvdy5S", - "UENPcHRpb25zEisKC2NsdXN0ZXJfZGVmGA4gASgLMhYudGVuc29yZmxvdy5D", - "bHVzdGVyRGVmEh0KFWlzb2xhdGVfc2Vzc2lvbl9zdGF0ZRgPIAEoCBI6Cgxl", - "eHBlcmltZW50YWwYECABKAsyJC50ZW5zb3JmbG93LkNvbmZpZ1Byb3RvLkV4", - "cGVyaW1lbnRhbBoyChBEZXZpY2VDb3VudEVudHJ5EgsKA2tleRgBIAEoCRIN", - "CgV2YWx1ZRgCIAEoBToCOAEa1gIKDEV4cGVyaW1lbnRhbBIfChdjb2xsZWN0", - "aXZlX2dyb3VwX2xlYWRlchgBIAEoCRIVCg1leGVjdXRvcl90eXBlGAMgASgJ", - "EhoKEnJlY3ZfYnVmX21heF9jaHVuaxgEIAEoBRIZChF1c2VfbnVtYV9hZmZp", - "bml0eRgFIAEoCBI1Ci1jb2xsZWN0aXZlX2RldGVybWluaXN0aWNfc2VxdWVu", - "dGlhbF9leGVjdXRpb24YBiABKAgSFwoPY29sbGVjdGl2ZV9uY2NsGAcgASgI", - "EjYKLnNoYXJlX3Nlc3Npb25fc3RhdGVfaW5fY2x1c3RlcnNwZWNfcHJvcGFn", - "YXRpb24YCCABKAgSHwoXZGlzYWJsZV90aHJlYWRfc3Bpbm5pbmcYCSABKAgS", - "KAogc2hhcmVfY2x1c3Rlcl9kZXZpY2VzX2luX3Nlc3Npb24YCiABKAhKBAgC", - "EAMi2AMKClJ1bk9wdGlvbnMSNgoLdHJhY2VfbGV2ZWwYASABKA4yIS50ZW5z", - "b3JmbG93LlJ1bk9wdGlvbnMuVHJhY2VMZXZlbBIVCg10aW1lb3V0X2luX21z", - "GAIgASgDEhwKFGludGVyX29wX3RocmVhZF9wb29sGAMgASgFEh8KF291dHB1", - "dF9wYXJ0aXRpb25fZ3JhcGhzGAUgASgIEi8KDWRlYnVnX29wdGlvbnMYBiAB", - "KAsyGC50ZW5zb3JmbG93LkRlYnVnT3B0aW9ucxIqCiJyZXBvcnRfdGVuc29y", - "X2FsbG9jYXRpb25zX3Vwb25fb29tGAcgASgIEjkKDGV4cGVyaW1lbnRhbBgI", - "IAEoCzIjLnRlbnNvcmZsb3cuUnVuT3B0aW9ucy5FeHBlcmltZW50YWwaSgoM", - "RXhwZXJpbWVudGFsEhwKFGNvbGxlY3RpdmVfZ3JhcGhfa2V5GAEgASgDEhwK", - "FHVzZV9ydW5faGFuZGxlcl9wb29sGAIgASgIIlIKClRyYWNlTGV2ZWwSDAoI", - "Tk9fVFJBQ0UQABISCg5TT0ZUV0FSRV9UUkFDRRABEhIKDkhBUkRXQVJFX1RS", - "QUNFEAISDgoKRlVMTF9UUkFDRRADSgQIBBAFIocDCgtSdW5NZXRhZGF0YRIp", - "CgpzdGVwX3N0YXRzGAEgASgLMhUudGVuc29yZmxvdy5TdGVwU3RhdHMSLAoK", - "Y29zdF9ncmFwaBgCIAEoCzIYLnRlbnNvcmZsb3cuQ29zdEdyYXBoRGVmEi4K", - "EHBhcnRpdGlvbl9ncmFwaHMYAyADKAsyFC50ZW5zb3JmbG93LkdyYXBoRGVm", - "Ej8KD2Z1bmN0aW9uX2dyYXBocxgEIAMoCzImLnRlbnNvcmZsb3cuUnVuTWV0", - "YWRhdGEuRnVuY3Rpb25HcmFwaHMarQEKDkZ1bmN0aW9uR3JhcGhzEi4KEHBh", - "cnRpdGlvbl9ncmFwaHMYASADKAsyFC50ZW5zb3JmbG93LkdyYXBoRGVmEjQK", - "FnByZV9vcHRpbWl6YXRpb25fZ3JhcGgYAiABKAsyFC50ZW5zb3JmbG93Lkdy", - "YXBoRGVmEjUKF3Bvc3Rfb3B0aW1pemF0aW9uX2dyYXBoGAMgASgLMhQudGVu", - "c29yZmxvdy5HcmFwaERlZiI6ChBUZW5zb3JDb25uZWN0aW9uEhMKC2Zyb21f", - "dGVuc29yGAEgASgJEhEKCXRvX3RlbnNvchgCIAEoCSKwAwoPQ2FsbGFibGVP", - "cHRpb25zEgwKBGZlZWQYASADKAkSDQoFZmV0Y2gYAiADKAkSDgoGdGFyZ2V0", - "GAMgAygJEisKC3J1bl9vcHRpb25zGAQgASgLMhYudGVuc29yZmxvdy5SdW5P", - "cHRpb25zEjcKEXRlbnNvcl9jb25uZWN0aW9uGAUgAygLMhwudGVuc29yZmxv", - "dy5UZW5zb3JDb25uZWN0aW9uEkIKDGZlZWRfZGV2aWNlcxgGIAMoCzIsLnRl", - "bnNvcmZsb3cuQ2FsbGFibGVPcHRpb25zLkZlZWREZXZpY2VzRW50cnkSRAoN", - "ZmV0Y2hfZGV2aWNlcxgHIAMoCzItLnRlbnNvcmZsb3cuQ2FsbGFibGVPcHRp", - "b25zLkZldGNoRGV2aWNlc0VudHJ5EhcKD2ZldGNoX3NraXBfc3luYxgIIAEo", - "CBoyChBGZWVkRGV2aWNlc0VudHJ5EgsKA2tleRgBIAEoCRINCgV2YWx1ZRgC", - "IAEoCToCOAEaMwoRRmV0Y2hEZXZpY2VzRW50cnkSCwoDa2V5GAEgASgJEg0K", - "BXZhbHVlGAIgASgJOgI4AUItChhvcmcudGVuc29yZmxvdy5mcmFtZXdvcmtC", - "DENvbmZpZ1Byb3Rvc1AB+AEBYgZwcm90bzM=")); + "YWRzGAEgASgFEhMKC2dsb2JhbF9uYW1lGAIgASgJIrQBCgpSUENPcHRpb25z", + "EiQKHHVzZV9ycGNfZm9yX2lucHJvY2Vzc19tYXN0ZXIYASABKAgSHQoVY29t", + "cHJlc3Npb25fYWxnb3JpdGhtGAIgASgJEhkKEWNvbXByZXNzaW9uX2xldmVs", + "GAMgASgFEhoKEmNhY2hlX3JwY19yZXNwb25zZRgEIAEoCBIqCiJkaXNhYmxl", + "X3Nlc3Npb25fY29ubmVjdGlvbl9zaGFyaW5nGAUgASgIIjAKD1Nlc3Npb25N", + "ZXRhZGF0YRIMCgRuYW1lGAEgASgJEg8KB3ZlcnNpb24YAiABKAMi9gkKC0Nv", + "bmZpZ1Byb3RvEj4KDGRldmljZV9jb3VudBgBIAMoCzIoLnRlbnNvcmZsb3cu", + "Q29uZmlnUHJvdG8uRGV2aWNlQ291bnRFbnRyeRIkChxpbnRyYV9vcF9wYXJh", + "bGxlbGlzbV90aHJlYWRzGAIgASgFEiQKHGludGVyX29wX3BhcmFsbGVsaXNt", + "X3RocmVhZHMYBSABKAUSHwoXdXNlX3Blcl9zZXNzaW9uX3RocmVhZHMYCSAB", + "KAgSRwocc2Vzc2lvbl9pbnRlcl9vcF90aHJlYWRfcG9vbBgMIAMoCzIhLnRl", + "bnNvcmZsb3cuVGhyZWFkUG9vbE9wdGlvblByb3RvEhgKEHBsYWNlbWVudF9w", + "ZXJpb2QYAyABKAUSFgoOZGV2aWNlX2ZpbHRlcnMYBCADKAkSKwoLZ3B1X29w", + "dGlvbnMYBiABKAsyFi50ZW5zb3JmbG93LkdQVU9wdGlvbnMSHAoUYWxsb3df", + "c29mdF9wbGFjZW1lbnQYByABKAgSHAoUbG9nX2RldmljZV9wbGFjZW1lbnQY", + "CCABKAgSLwoNZ3JhcGhfb3B0aW9ucxgKIAEoCzIYLnRlbnNvcmZsb3cuR3Jh", + "cGhPcHRpb25zEh8KF29wZXJhdGlvbl90aW1lb3V0X2luX21zGAsgASgDEisK", + "C3JwY19vcHRpb25zGA0gASgLMhYudGVuc29yZmxvdy5SUENPcHRpb25zEisK", + "C2NsdXN0ZXJfZGVmGA4gASgLMhYudGVuc29yZmxvdy5DbHVzdGVyRGVmEh0K", + "FWlzb2xhdGVfc2Vzc2lvbl9zdGF0ZRgPIAEoCBI6CgxleHBlcmltZW50YWwY", + "ECABKAsyJC50ZW5zb3JmbG93LkNvbmZpZ1Byb3RvLkV4cGVyaW1lbnRhbBoy", + "ChBEZXZpY2VDb3VudEVudHJ5EgsKA2tleRgBIAEoCRINCgV2YWx1ZRgCIAEo", + "BToCOAEamgQKDEV4cGVyaW1lbnRhbBIfChdjb2xsZWN0aXZlX2dyb3VwX2xl", + "YWRlchgBIAEoCRIVCg1leGVjdXRvcl90eXBlGAMgASgJEhoKEnJlY3ZfYnVm", + "X21heF9jaHVuaxgEIAEoBRIZChF1c2VfbnVtYV9hZmZpbml0eRgFIAEoCBI1", + "Ci1jb2xsZWN0aXZlX2RldGVybWluaXN0aWNfc2VxdWVudGlhbF9leGVjdXRp", + "b24YBiABKAgSFwoPY29sbGVjdGl2ZV9uY2NsGAcgASgIEjYKLnNoYXJlX3Nl", + "c3Npb25fc3RhdGVfaW5fY2x1c3RlcnNwZWNfcHJvcGFnYXRpb24YCCABKAgS", + "HwoXZGlzYWJsZV90aHJlYWRfc3Bpbm5pbmcYCSABKAgSKAogc2hhcmVfY2x1", + "c3Rlcl9kZXZpY2VzX2luX3Nlc3Npb24YCiABKAgSNQoQc2Vzc2lvbl9tZXRh", + "ZGF0YRgLIAEoCzIbLnRlbnNvcmZsb3cuU2Vzc2lvbk1ldGFkYXRhEiEKGW9w", + "dGltaXplX2Zvcl9zdGF0aWNfZ3JhcGgYDCABKAgSGgoSZW5hYmxlX21saXJf", + "YnJpZGdlGA0gASgIEicKH2Rpc2FibGVfb3V0cHV0X3BhcnRpdGlvbl9ncmFw", + "aHMYDiABKAgSIwobeGxhX2Z1c2lvbl9hdXRvdHVuZXJfdGhyZXNoGA8gASgD", + "SgQIAhADItgDCgpSdW5PcHRpb25zEjYKC3RyYWNlX2xldmVsGAEgASgOMiEu", + "dGVuc29yZmxvdy5SdW5PcHRpb25zLlRyYWNlTGV2ZWwSFQoNdGltZW91dF9p", + "bl9tcxgCIAEoAxIcChRpbnRlcl9vcF90aHJlYWRfcG9vbBgDIAEoBRIfChdv", + "dXRwdXRfcGFydGl0aW9uX2dyYXBocxgFIAEoCBIvCg1kZWJ1Z19vcHRpb25z", + "GAYgASgLMhgudGVuc29yZmxvdy5EZWJ1Z09wdGlvbnMSKgoicmVwb3J0X3Rl", + "bnNvcl9hbGxvY2F0aW9uc191cG9uX29vbRgHIAEoCBI5CgxleHBlcmltZW50", + "YWwYCCABKAsyIy50ZW5zb3JmbG93LlJ1bk9wdGlvbnMuRXhwZXJpbWVudGFs", + "GkoKDEV4cGVyaW1lbnRhbBIcChRjb2xsZWN0aXZlX2dyYXBoX2tleRgBIAEo", + "AxIcChR1c2VfcnVuX2hhbmRsZXJfcG9vbBgCIAEoCCJSCgpUcmFjZUxldmVs", + "EgwKCE5PX1RSQUNFEAASEgoOU09GVFdBUkVfVFJBQ0UQARISCg5IQVJEV0FS", + "RV9UUkFDRRACEg4KCkZVTExfVFJBQ0UQA0oECAQQBSKHAwoLUnVuTWV0YWRh", + "dGESKQoKc3RlcF9zdGF0cxgBIAEoCzIVLnRlbnNvcmZsb3cuU3RlcFN0YXRz", + "EiwKCmNvc3RfZ3JhcGgYAiABKAsyGC50ZW5zb3JmbG93LkNvc3RHcmFwaERl", + "ZhIuChBwYXJ0aXRpb25fZ3JhcGhzGAMgAygLMhQudGVuc29yZmxvdy5HcmFw", + "aERlZhI/Cg9mdW5jdGlvbl9ncmFwaHMYBCADKAsyJi50ZW5zb3JmbG93LlJ1", + "bk1ldGFkYXRhLkZ1bmN0aW9uR3JhcGhzGq0BCg5GdW5jdGlvbkdyYXBocxIu", + "ChBwYXJ0aXRpb25fZ3JhcGhzGAEgAygLMhQudGVuc29yZmxvdy5HcmFwaERl", + "ZhI0ChZwcmVfb3B0aW1pemF0aW9uX2dyYXBoGAIgASgLMhQudGVuc29yZmxv", + "dy5HcmFwaERlZhI1Chdwb3N0X29wdGltaXphdGlvbl9ncmFwaBgDIAEoCzIU", + "LnRlbnNvcmZsb3cuR3JhcGhEZWYiOgoQVGVuc29yQ29ubmVjdGlvbhITCgtm", + "cm9tX3RlbnNvchgBIAEoCRIRCgl0b190ZW5zb3IYAiABKAkisAMKD0NhbGxh", + "YmxlT3B0aW9ucxIMCgRmZWVkGAEgAygJEg0KBWZldGNoGAIgAygJEg4KBnRh", + "cmdldBgDIAMoCRIrCgtydW5fb3B0aW9ucxgEIAEoCzIWLnRlbnNvcmZsb3cu", + "UnVuT3B0aW9ucxI3ChF0ZW5zb3JfY29ubmVjdGlvbhgFIAMoCzIcLnRlbnNv", + "cmZsb3cuVGVuc29yQ29ubmVjdGlvbhJCCgxmZWVkX2RldmljZXMYBiADKAsy", + "LC50ZW5zb3JmbG93LkNhbGxhYmxlT3B0aW9ucy5GZWVkRGV2aWNlc0VudHJ5", + "EkQKDWZldGNoX2RldmljZXMYByADKAsyLS50ZW5zb3JmbG93LkNhbGxhYmxl", + "T3B0aW9ucy5GZXRjaERldmljZXNFbnRyeRIXCg9mZXRjaF9za2lwX3N5bmMY", + "CCABKAgaMgoQRmVlZERldmljZXNFbnRyeRILCgNrZXkYASABKAkSDQoFdmFs", + "dWUYAiABKAk6AjgBGjMKEUZldGNoRGV2aWNlc0VudHJ5EgsKA2tleRgBIAEo", + "CRINCgV2YWx1ZRgCIAEoCToCOAFCawoYb3JnLnRlbnNvcmZsb3cuZnJhbWV3", + "b3JrQgxDb25maWdQcm90b3NQAVo8Z2l0aHViLmNvbS90ZW5zb3JmbG93L3Rl", + "bnNvcmZsb3cvdGVuc29yZmxvdy9nby9jb3JlL3Byb3RvYnVm+AEBYgZwcm90", + "bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Tensorflow.CostGraphReflection.Descriptor, global::Tensorflow.GraphReflection.Descriptor, global::Tensorflow.StepStatsReflection.Descriptor, global::Tensorflow.ClusterReflection.Descriptor, global::Tensorflow.DebugReflection.Descriptor, global::Tensorflow.RewriterConfigReflection.Descriptor, }, - new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.GPUOptions), global::Tensorflow.GPUOptions.Parser, new[]{ "PerProcessGpuMemoryFraction", "AllowGrowth", "AllocatorType", "DeferredDeletionBytes", "VisibleDeviceList", "PollingActiveDelayUsecs", "PollingInactiveDelayMsecs", "ForceGpuCompatible", "Experimental" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.GPUOptions.Types.Experimental), global::Tensorflow.GPUOptions.Types.Experimental.Parser, new[]{ "VirtualDevices", "UseUnifiedMemory", "NumDevToDevCopyStreams", "CollectiveRingOrder", "TimestampedAllocator", "KernelTrackerMaxInterval", "KernelTrackerMaxBytes", "KernelTrackerMaxPending" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.GPUOptions.Types.Experimental.Types.VirtualDevices), global::Tensorflow.GPUOptions.Types.Experimental.Types.VirtualDevices.Parser, new[]{ "MemoryLimitMb" }, null, null, null)})}), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.OptimizerOptions), global::Tensorflow.OptimizerOptions.Parser, new[]{ "DoCommonSubexpressionElimination", "DoConstantFolding", "MaxFoldedConstantInBytes", "DoFunctionInlining", "OptLevel", "GlobalJitLevel" }, null, new[]{ typeof(global::Tensorflow.OptimizerOptions.Types.Level), typeof(global::Tensorflow.OptimizerOptions.Types.GlobalJitLevel) }, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.GraphOptions), global::Tensorflow.GraphOptions.Parser, new[]{ "EnableRecvScheduling", "OptimizerOptions", "BuildCostModel", "BuildCostModelAfter", "InferShapes", "PlacePrunedGraph", "EnableBfloat16Sendrecv", "TimelineStep", "RewriteOptions" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.ThreadPoolOptionProto), global::Tensorflow.ThreadPoolOptionProto.Parser, new[]{ "NumThreads", "GlobalName" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.RPCOptions), global::Tensorflow.RPCOptions.Parser, new[]{ "UseRpcForInprocessMaster", "CompressionAlgorithm", "CompressionLevel" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.ConfigProto), global::Tensorflow.ConfigProto.Parser, new[]{ "DeviceCount", "IntraOpParallelismThreads", "InterOpParallelismThreads", "UsePerSessionThreads", "SessionInterOpThreadPool", "PlacementPeriod", "DeviceFilters", "GpuOptions", "AllowSoftPlacement", "LogDevicePlacement", "GraphOptions", "OperationTimeoutInMs", "RpcOptions", "ClusterDef", "IsolateSessionState", "Experimental" }, null, null, new pbr::GeneratedClrTypeInfo[] { null, new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.ConfigProto.Types.Experimental), global::Tensorflow.ConfigProto.Types.Experimental.Parser, new[]{ "CollectiveGroupLeader", "ExecutorType", "RecvBufMaxChunk", "UseNumaAffinity", "CollectiveDeterministicSequentialExecution", "CollectiveNccl", "ShareSessionStateInClusterspecPropagation", "DisableThreadSpinning", "ShareClusterDevicesInSession" }, null, null, null)}), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.RunOptions), global::Tensorflow.RunOptions.Parser, new[]{ "TraceLevel", "TimeoutInMs", "InterOpThreadPool", "OutputPartitionGraphs", "DebugOptions", "ReportTensorAllocationsUponOom", "Experimental" }, null, new[]{ typeof(global::Tensorflow.RunOptions.Types.TraceLevel) }, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.RunOptions.Types.Experimental), global::Tensorflow.RunOptions.Types.Experimental.Parser, new[]{ "CollectiveGraphKey", "UseRunHandlerPool" }, null, null, null)}), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.RunMetadata), global::Tensorflow.RunMetadata.Parser, new[]{ "StepStats", "CostGraph", "PartitionGraphs", "FunctionGraphs" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.RunMetadata.Types.FunctionGraphs), global::Tensorflow.RunMetadata.Types.FunctionGraphs.Parser, new[]{ "PartitionGraphs", "PreOptimizationGraph", "PostOptimizationGraph" }, null, null, null)}), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.TensorConnection), global::Tensorflow.TensorConnection.Parser, new[]{ "FromTensor", "ToTensor" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.CallableOptions), global::Tensorflow.CallableOptions.Parser, new[]{ "Feed", "Fetch", "Target", "RunOptions", "TensorConnection", "FeedDevices", "FetchDevices", "FetchSkipSync" }, null, null, new pbr::GeneratedClrTypeInfo[] { null, null, }) + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.GPUOptions), global::Tensorflow.GPUOptions.Parser, new[]{ "PerProcessGpuMemoryFraction", "AllowGrowth", "AllocatorType", "DeferredDeletionBytes", "VisibleDeviceList", "PollingActiveDelayUsecs", "PollingInactiveDelayMsecs", "ForceGpuCompatible", "Experimental" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.GPUOptions.Types.Experimental), global::Tensorflow.GPUOptions.Types.Experimental.Parser, new[]{ "VirtualDevices", "UseUnifiedMemory", "NumDevToDevCopyStreams", "CollectiveRingOrder", "TimestampedAllocator", "KernelTrackerMaxInterval", "KernelTrackerMaxBytes", "KernelTrackerMaxPending" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.GPUOptions.Types.Experimental.Types.VirtualDevices), global::Tensorflow.GPUOptions.Types.Experimental.Types.VirtualDevices.Parser, new[]{ "MemoryLimitMb" }, null, null, null, null)})}), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.OptimizerOptions), global::Tensorflow.OptimizerOptions.Parser, new[]{ "DoCommonSubexpressionElimination", "DoConstantFolding", "MaxFoldedConstantInBytes", "DoFunctionInlining", "OptLevel", "GlobalJitLevel" }, null, new[]{ typeof(global::Tensorflow.OptimizerOptions.Types.Level), typeof(global::Tensorflow.OptimizerOptions.Types.GlobalJitLevel) }, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.GraphOptions), global::Tensorflow.GraphOptions.Parser, new[]{ "EnableRecvScheduling", "OptimizerOptions", "BuildCostModel", "BuildCostModelAfter", "InferShapes", "PlacePrunedGraph", "EnableBfloat16Sendrecv", "TimelineStep", "RewriteOptions" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.ThreadPoolOptionProto), global::Tensorflow.ThreadPoolOptionProto.Parser, new[]{ "NumThreads", "GlobalName" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.RPCOptions), global::Tensorflow.RPCOptions.Parser, new[]{ "UseRpcForInprocessMaster", "CompressionAlgorithm", "CompressionLevel", "CacheRpcResponse", "DisableSessionConnectionSharing" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.SessionMetadata), global::Tensorflow.SessionMetadata.Parser, new[]{ "Name", "Version" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.ConfigProto), global::Tensorflow.ConfigProto.Parser, new[]{ "DeviceCount", "IntraOpParallelismThreads", "InterOpParallelismThreads", "UsePerSessionThreads", "SessionInterOpThreadPool", "PlacementPeriod", "DeviceFilters", "GpuOptions", "AllowSoftPlacement", "LogDevicePlacement", "GraphOptions", "OperationTimeoutInMs", "RpcOptions", "ClusterDef", "IsolateSessionState", "Experimental" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.ConfigProto.Types.Experimental), global::Tensorflow.ConfigProto.Types.Experimental.Parser, new[]{ "CollectiveGroupLeader", "ExecutorType", "RecvBufMaxChunk", "UseNumaAffinity", "CollectiveDeterministicSequentialExecution", "CollectiveNccl", "ShareSessionStateInClusterspecPropagation", "DisableThreadSpinning", "ShareClusterDevicesInSession", "SessionMetadata", "OptimizeForStaticGraph", "EnableMlirBridge", "DisableOutputPartitionGraphs", "XlaFusionAutotunerThresh" }, null, null, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.RunOptions), global::Tensorflow.RunOptions.Parser, new[]{ "TraceLevel", "TimeoutInMs", "InterOpThreadPool", "OutputPartitionGraphs", "DebugOptions", "ReportTensorAllocationsUponOom", "Experimental" }, null, new[]{ typeof(global::Tensorflow.RunOptions.Types.TraceLevel) }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.RunOptions.Types.Experimental), global::Tensorflow.RunOptions.Types.Experimental.Parser, new[]{ "CollectiveGraphKey", "UseRunHandlerPool" }, null, null, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.RunMetadata), global::Tensorflow.RunMetadata.Parser, new[]{ "StepStats", "CostGraph", "PartitionGraphs", "FunctionGraphs" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.RunMetadata.Types.FunctionGraphs), global::Tensorflow.RunMetadata.Types.FunctionGraphs.Parser, new[]{ "PartitionGraphs", "PreOptimizationGraph", "PostOptimizationGraph" }, null, null, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.TensorConnection), global::Tensorflow.TensorConnection.Parser, new[]{ "FromTensor", "ToTensor" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.CallableOptions), global::Tensorflow.CallableOptions.Parser, new[]{ "Feed", "Fetch", "Target", "RunOptions", "TensorConnection", "FeedDevices", "FetchDevices", "FetchSkipSync" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, null, }) })); } #endregion @@ -527,7 +537,7 @@ namespace Tensorflow { } if (other.experimental_ != null) { if (experimental_ == null) { - experimental_ = new global::Tensorflow.GPUOptions.Types.Experimental(); + Experimental = new global::Tensorflow.GPUOptions.Types.Experimental(); } Experimental.MergeFrom(other.Experimental); } @@ -576,9 +586,9 @@ namespace Tensorflow { } case 74: { if (experimental_ == null) { - experimental_ = new global::Tensorflow.GPUOptions.Types.Experimental(); + Experimental = new global::Tensorflow.GPUOptions.Types.Experimental(); } - input.ReadMessage(experimental_); + input.ReadMessage(Experimental); break; } } @@ -1232,7 +1242,7 @@ namespace Tensorflow { /// Field number for the "opt_level" field. public const int OptLevelFieldNumber = 3; - private global::Tensorflow.OptimizerOptions.Types.Level optLevel_ = 0; + private global::Tensorflow.OptimizerOptions.Types.Level optLevel_ = global::Tensorflow.OptimizerOptions.Types.Level.L1; /// /// Overall optimization level. The actual optimizations applied will be the /// logical OR of the flags that this level implies and any flags already set. @@ -1247,7 +1257,7 @@ namespace Tensorflow { /// Field number for the "global_jit_level" field. public const int GlobalJitLevelFieldNumber = 5; - private global::Tensorflow.OptimizerOptions.Types.GlobalJitLevel globalJitLevel_ = 0; + private global::Tensorflow.OptimizerOptions.Types.GlobalJitLevel globalJitLevel_ = global::Tensorflow.OptimizerOptions.Types.GlobalJitLevel.Default; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public global::Tensorflow.OptimizerOptions.Types.GlobalJitLevel GlobalJitLevel { get { return globalJitLevel_; } @@ -1285,8 +1295,8 @@ namespace Tensorflow { if (DoConstantFolding != false) hash ^= DoConstantFolding.GetHashCode(); if (MaxFoldedConstantInBytes != 0L) hash ^= MaxFoldedConstantInBytes.GetHashCode(); if (DoFunctionInlining != false) hash ^= DoFunctionInlining.GetHashCode(); - if (OptLevel != 0) hash ^= OptLevel.GetHashCode(); - if (GlobalJitLevel != 0) hash ^= GlobalJitLevel.GetHashCode(); + if (OptLevel != global::Tensorflow.OptimizerOptions.Types.Level.L1) hash ^= OptLevel.GetHashCode(); + if (GlobalJitLevel != global::Tensorflow.OptimizerOptions.Types.GlobalJitLevel.Default) hash ^= GlobalJitLevel.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -1308,7 +1318,7 @@ namespace Tensorflow { output.WriteRawTag(16); output.WriteBool(DoConstantFolding); } - if (OptLevel != 0) { + if (OptLevel != global::Tensorflow.OptimizerOptions.Types.Level.L1) { output.WriteRawTag(24); output.WriteEnum((int) OptLevel); } @@ -1316,7 +1326,7 @@ namespace Tensorflow { output.WriteRawTag(32); output.WriteBool(DoFunctionInlining); } - if (GlobalJitLevel != 0) { + if (GlobalJitLevel != global::Tensorflow.OptimizerOptions.Types.GlobalJitLevel.Default) { output.WriteRawTag(40); output.WriteEnum((int) GlobalJitLevel); } @@ -1344,10 +1354,10 @@ namespace Tensorflow { if (DoFunctionInlining != false) { size += 1 + 1; } - if (OptLevel != 0) { + if (OptLevel != global::Tensorflow.OptimizerOptions.Types.Level.L1) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) OptLevel); } - if (GlobalJitLevel != 0) { + if (GlobalJitLevel != global::Tensorflow.OptimizerOptions.Types.GlobalJitLevel.Default) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) GlobalJitLevel); } if (_unknownFields != null) { @@ -1373,10 +1383,10 @@ namespace Tensorflow { if (other.DoFunctionInlining != false) { DoFunctionInlining = other.DoFunctionInlining; } - if (other.OptLevel != 0) { + if (other.OptLevel != global::Tensorflow.OptimizerOptions.Types.Level.L1) { OptLevel = other.OptLevel; } - if (other.GlobalJitLevel != 0) { + if (other.GlobalJitLevel != global::Tensorflow.OptimizerOptions.Types.GlobalJitLevel.Default) { GlobalJitLevel = other.GlobalJitLevel; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); @@ -1399,7 +1409,7 @@ namespace Tensorflow { break; } case 24: { - optLevel_ = (global::Tensorflow.OptimizerOptions.Types.Level) input.ReadEnum(); + OptLevel = (global::Tensorflow.OptimizerOptions.Types.Level) input.ReadEnum(); break; } case 32: { @@ -1407,7 +1417,7 @@ namespace Tensorflow { break; } case 40: { - globalJitLevel_ = (global::Tensorflow.OptimizerOptions.Types.GlobalJitLevel) input.ReadEnum(); + GlobalJitLevel = (global::Tensorflow.OptimizerOptions.Types.GlobalJitLevel) input.ReadEnum(); break; } case 48: { @@ -1782,7 +1792,7 @@ namespace Tensorflow { } if (other.optimizerOptions_ != null) { if (optimizerOptions_ == null) { - optimizerOptions_ = new global::Tensorflow.OptimizerOptions(); + OptimizerOptions = new global::Tensorflow.OptimizerOptions(); } OptimizerOptions.MergeFrom(other.OptimizerOptions); } @@ -1806,7 +1816,7 @@ namespace Tensorflow { } if (other.rewriteOptions_ != null) { if (rewriteOptions_ == null) { - rewriteOptions_ = new global::Tensorflow.RewriterConfig(); + RewriteOptions = new global::Tensorflow.RewriterConfig(); } RewriteOptions.MergeFrom(other.RewriteOptions); } @@ -1827,9 +1837,9 @@ namespace Tensorflow { } case 26: { if (optimizerOptions_ == null) { - optimizerOptions_ = new global::Tensorflow.OptimizerOptions(); + OptimizerOptions = new global::Tensorflow.OptimizerOptions(); } - input.ReadMessage(optimizerOptions_); + input.ReadMessage(OptimizerOptions); break; } case 32: { @@ -1858,9 +1868,9 @@ namespace Tensorflow { } case 82: { if (rewriteOptions_ == null) { - rewriteOptions_ = new global::Tensorflow.RewriterConfig(); + RewriteOptions = new global::Tensorflow.RewriterConfig(); } - input.ReadMessage(rewriteOptions_); + input.ReadMessage(RewriteOptions); break; } } @@ -2077,6 +2087,8 @@ namespace Tensorflow { useRpcForInprocessMaster_ = other.useRpcForInprocessMaster_; compressionAlgorithm_ = other.compressionAlgorithm_; compressionLevel_ = other.compressionLevel_; + cacheRpcResponse_ = other.cacheRpcResponse_; + disableSessionConnectionSharing_ = other.disableSessionConnectionSharing_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -2132,6 +2144,39 @@ namespace Tensorflow { } } + /// Field number for the "cache_rpc_response" field. + public const int CacheRpcResponseFieldNumber = 4; + private bool cacheRpcResponse_; + /// + /// Setting cache_rpc_response to true will enable sender side caching of + /// response for RecvTensorAsync and RecvBufAsync to allow receiver to retry + /// requests . This is only necessary when the network fabric is experiencing a + /// significant error rate. Without it we'll fail a step on an network error, + /// while with it we'll be able to complete long steps (like complex + /// initializations) in the face of some network errors during RecvTensor. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool CacheRpcResponse { + get { return cacheRpcResponse_; } + set { + cacheRpcResponse_ = value; + } + } + + /// Field number for the "disable_session_connection_sharing" field. + public const int DisableSessionConnectionSharingFieldNumber = 5; + private bool disableSessionConnectionSharing_; + /// + /// Disables TCP connection sharing when opening a new RPC channel. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool DisableSessionConnectionSharing { + get { return disableSessionConnectionSharing_; } + set { + disableSessionConnectionSharing_ = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as RPCOptions); @@ -2148,6 +2193,8 @@ namespace Tensorflow { if (UseRpcForInprocessMaster != other.UseRpcForInprocessMaster) return false; if (CompressionAlgorithm != other.CompressionAlgorithm) return false; if (CompressionLevel != other.CompressionLevel) return false; + if (CacheRpcResponse != other.CacheRpcResponse) return false; + if (DisableSessionConnectionSharing != other.DisableSessionConnectionSharing) return false; return Equals(_unknownFields, other._unknownFields); } @@ -2157,6 +2204,8 @@ namespace Tensorflow { if (UseRpcForInprocessMaster != false) hash ^= UseRpcForInprocessMaster.GetHashCode(); if (CompressionAlgorithm.Length != 0) hash ^= CompressionAlgorithm.GetHashCode(); if (CompressionLevel != 0) hash ^= CompressionLevel.GetHashCode(); + if (CacheRpcResponse != false) hash ^= CacheRpcResponse.GetHashCode(); + if (DisableSessionConnectionSharing != false) hash ^= DisableSessionConnectionSharing.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -2182,6 +2231,14 @@ namespace Tensorflow { output.WriteRawTag(24); output.WriteInt32(CompressionLevel); } + if (CacheRpcResponse != false) { + output.WriteRawTag(32); + output.WriteBool(CacheRpcResponse); + } + if (DisableSessionConnectionSharing != false) { + output.WriteRawTag(40); + output.WriteBool(DisableSessionConnectionSharing); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -2199,6 +2256,12 @@ namespace Tensorflow { if (CompressionLevel != 0) { size += 1 + pb::CodedOutputStream.ComputeInt32Size(CompressionLevel); } + if (CacheRpcResponse != false) { + size += 1 + 1; + } + if (DisableSessionConnectionSharing != false) { + size += 1 + 1; + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -2219,6 +2282,12 @@ namespace Tensorflow { if (other.CompressionLevel != 0) { CompressionLevel = other.CompressionLevel; } + if (other.CacheRpcResponse != false) { + CacheRpcResponse = other.CacheRpcResponse; + } + if (other.DisableSessionConnectionSharing != false) { + DisableSessionConnectionSharing = other.DisableSessionConnectionSharing; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -2242,6 +2311,184 @@ namespace Tensorflow { CompressionLevel = input.ReadInt32(); break; } + case 32: { + CacheRpcResponse = input.ReadBool(); + break; + } + case 40: { + DisableSessionConnectionSharing = input.ReadBool(); + break; + } + } + } + } + + } + + /// + /// Metadata about the session. + /// + /// This can be used by the runtime and the Ops for debugging, monitoring, etc. + /// + /// The (name, version) tuple is expected to be a unique identifier for + /// sessions within the same process. + /// + /// NOTE: This is currently used and propagated only by the direct session. + /// + public sealed partial class SessionMetadata : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SessionMetadata()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.ConfigReflection.Descriptor.MessageTypes[5]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SessionMetadata() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SessionMetadata(SessionMetadata other) : this() { + name_ = other.name_; + version_ = other.version_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SessionMetadata Clone() { + return new SessionMetadata(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "version" field. + public const int VersionFieldNumber = 2; + private long version_; + /// + /// The version is optional. If set, needs to be >= 0. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public long Version { + get { return version_; } + set { + version_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as SessionMetadata); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(SessionMetadata other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if (Version != other.Version) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (Version != 0L) hash ^= Version.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (Version != 0L) { + output.WriteRawTag(16); + output.WriteInt64(Version); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (Version != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Version); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(SessionMetadata other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.Version != 0L) { + Version = other.Version; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 16: { + Version = input.ReadInt64(); + break; + } } } } @@ -2260,7 +2507,7 @@ namespace Tensorflow { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { - get { return global::Tensorflow.ConfigReflection.Descriptor.MessageTypes[5]; } + get { return global::Tensorflow.ConfigReflection.Descriptor.MessageTypes[6]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -2304,7 +2551,7 @@ namespace Tensorflow { /// Field number for the "device_count" field. public const int DeviceCountFieldNumber = 1; private static readonly pbc::MapField.Codec _map_deviceCount_codec - = new pbc::MapField.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForInt32(16), 10); + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForInt32(16, 0), 10); private readonly pbc::MapField deviceCount_ = new pbc::MapField(); /// /// Map from device type name (e.g., "CPU" or "GPU" ) to maximum @@ -2769,7 +3016,7 @@ namespace Tensorflow { deviceFilters_.Add(other.deviceFilters_); if (other.gpuOptions_ != null) { if (gpuOptions_ == null) { - gpuOptions_ = new global::Tensorflow.GPUOptions(); + GpuOptions = new global::Tensorflow.GPUOptions(); } GpuOptions.MergeFrom(other.GpuOptions); } @@ -2781,7 +3028,7 @@ namespace Tensorflow { } if (other.graphOptions_ != null) { if (graphOptions_ == null) { - graphOptions_ = new global::Tensorflow.GraphOptions(); + GraphOptions = new global::Tensorflow.GraphOptions(); } GraphOptions.MergeFrom(other.GraphOptions); } @@ -2790,13 +3037,13 @@ namespace Tensorflow { } if (other.rpcOptions_ != null) { if (rpcOptions_ == null) { - rpcOptions_ = new global::Tensorflow.RPCOptions(); + RpcOptions = new global::Tensorflow.RPCOptions(); } RpcOptions.MergeFrom(other.RpcOptions); } if (other.clusterDef_ != null) { if (clusterDef_ == null) { - clusterDef_ = new global::Tensorflow.ClusterDef(); + ClusterDef = new global::Tensorflow.ClusterDef(); } ClusterDef.MergeFrom(other.ClusterDef); } @@ -2805,7 +3052,7 @@ namespace Tensorflow { } if (other.experimental_ != null) { if (experimental_ == null) { - experimental_ = new global::Tensorflow.ConfigProto.Types.Experimental(); + Experimental = new global::Tensorflow.ConfigProto.Types.Experimental(); } Experimental.MergeFrom(other.Experimental); } @@ -2842,9 +3089,9 @@ namespace Tensorflow { } case 50: { if (gpuOptions_ == null) { - gpuOptions_ = new global::Tensorflow.GPUOptions(); + GpuOptions = new global::Tensorflow.GPUOptions(); } - input.ReadMessage(gpuOptions_); + input.ReadMessage(GpuOptions); break; } case 56: { @@ -2861,9 +3108,9 @@ namespace Tensorflow { } case 82: { if (graphOptions_ == null) { - graphOptions_ = new global::Tensorflow.GraphOptions(); + GraphOptions = new global::Tensorflow.GraphOptions(); } - input.ReadMessage(graphOptions_); + input.ReadMessage(GraphOptions); break; } case 88: { @@ -2876,16 +3123,16 @@ namespace Tensorflow { } case 106: { if (rpcOptions_ == null) { - rpcOptions_ = new global::Tensorflow.RPCOptions(); + RpcOptions = new global::Tensorflow.RPCOptions(); } - input.ReadMessage(rpcOptions_); + input.ReadMessage(RpcOptions); break; } case 114: { if (clusterDef_ == null) { - clusterDef_ = new global::Tensorflow.ClusterDef(); + ClusterDef = new global::Tensorflow.ClusterDef(); } - input.ReadMessage(clusterDef_); + input.ReadMessage(ClusterDef); break; } case 120: { @@ -2894,9 +3141,9 @@ namespace Tensorflow { } case 130: { if (experimental_ == null) { - experimental_ = new global::Tensorflow.ConfigProto.Types.Experimental(); + Experimental = new global::Tensorflow.ConfigProto.Types.Experimental(); } - input.ReadMessage(experimental_); + input.ReadMessage(Experimental); break; } } @@ -2946,6 +3193,11 @@ namespace Tensorflow { shareSessionStateInClusterspecPropagation_ = other.shareSessionStateInClusterspecPropagation_; disableThreadSpinning_ = other.disableThreadSpinning_; shareClusterDevicesInSession_ = other.shareClusterDevicesInSession_; + sessionMetadata_ = other.sessionMetadata_ != null ? other.sessionMetadata_.Clone() : null; + optimizeForStaticGraph_ = other.optimizeForStaticGraph_; + enableMlirBridge_ = other.enableMlirBridge_; + disableOutputPartitionGraphs_ = other.disableOutputPartitionGraphs_; + xlaFusionAutotunerThresh_ = other.xlaFusionAutotunerThresh_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -3112,6 +3364,104 @@ namespace Tensorflow { } } + /// Field number for the "session_metadata" field. + public const int SessionMetadataFieldNumber = 11; + private global::Tensorflow.SessionMetadata sessionMetadata_; + /// + /// Metadata about the session. + /// + /// If set, this can be used by the runtime and the Ops for debugging, + /// monitoring, etc. + /// + /// NOTE: This is currently used and propagated only by the direct session. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.SessionMetadata SessionMetadata { + get { return sessionMetadata_; } + set { + sessionMetadata_ = value; + } + } + + /// Field number for the "optimize_for_static_graph" field. + public const int OptimizeForStaticGraphFieldNumber = 12; + private bool optimizeForStaticGraph_; + /// + /// If true, the session may treat the graph as being static for optimization + /// purposes. + /// + /// If this option is set to true when a session is created, the full + /// GraphDef must be passed in a single call to Session::Create(), and + /// Session::Extend() may not be supported. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool OptimizeForStaticGraph { + get { return optimizeForStaticGraph_; } + set { + optimizeForStaticGraph_ = value; + } + } + + /// Field number for the "enable_mlir_bridge" field. + public const int EnableMlirBridgeFieldNumber = 13; + private bool enableMlirBridge_; + /// + /// Whether to enable the MLIR-based TF->XLA bridge. + /// + /// This is a replacement to the existing bridge, and not ready for + /// production usage yet. + /// If this option is set to true when a session is created, MLIR is used to + /// perform the set of graph transformations to put the graph in a form that + /// can be executed with delegation of some computations to an accelerator. + /// This builds on the model of XLA where a subset of the graph is + /// encapsulated and attached to a "compile" operation, whose result is fed + /// to an "execute" operation. The kernel for these operations is responsible + /// to lower the encapsulated graph to a particular device. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool EnableMlirBridge { + get { return enableMlirBridge_; } + set { + enableMlirBridge_ = value; + } + } + + /// Field number for the "disable_output_partition_graphs" field. + public const int DisableOutputPartitionGraphsFieldNumber = 14; + private bool disableOutputPartitionGraphs_; + /// + /// If true, the session will not store an additional copy of the graph for + /// each subgraph. + /// + /// If this option is set to true when a session is created, the + /// `RunOptions.output_partition_graphs` options must not be set. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool DisableOutputPartitionGraphs { + get { return disableOutputPartitionGraphs_; } + set { + disableOutputPartitionGraphs_ = value; + } + } + + /// Field number for the "xla_fusion_autotuner_thresh" field. + public const int XlaFusionAutotunerThreshFieldNumber = 15; + private long xlaFusionAutotunerThresh_; + /// + /// Minimum number of batches run through the XLA graph before XLA fusion + /// autotuner is enabled. Default value of zero disables the autotuner. + /// + /// The XLA fusion autotuner can improve performance by executing a heuristic + /// search on the compiler parameters. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public long XlaFusionAutotunerThresh { + get { return xlaFusionAutotunerThresh_; } + set { + xlaFusionAutotunerThresh_ = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as Experimental); @@ -3134,6 +3484,11 @@ namespace Tensorflow { if (ShareSessionStateInClusterspecPropagation != other.ShareSessionStateInClusterspecPropagation) return false; if (DisableThreadSpinning != other.DisableThreadSpinning) return false; if (ShareClusterDevicesInSession != other.ShareClusterDevicesInSession) return false; + if (!object.Equals(SessionMetadata, other.SessionMetadata)) return false; + if (OptimizeForStaticGraph != other.OptimizeForStaticGraph) return false; + if (EnableMlirBridge != other.EnableMlirBridge) return false; + if (DisableOutputPartitionGraphs != other.DisableOutputPartitionGraphs) return false; + if (XlaFusionAutotunerThresh != other.XlaFusionAutotunerThresh) return false; return Equals(_unknownFields, other._unknownFields); } @@ -3149,6 +3504,11 @@ namespace Tensorflow { if (ShareSessionStateInClusterspecPropagation != false) hash ^= ShareSessionStateInClusterspecPropagation.GetHashCode(); if (DisableThreadSpinning != false) hash ^= DisableThreadSpinning.GetHashCode(); if (ShareClusterDevicesInSession != false) hash ^= ShareClusterDevicesInSession.GetHashCode(); + if (sessionMetadata_ != null) hash ^= SessionMetadata.GetHashCode(); + if (OptimizeForStaticGraph != false) hash ^= OptimizeForStaticGraph.GetHashCode(); + if (EnableMlirBridge != false) hash ^= EnableMlirBridge.GetHashCode(); + if (DisableOutputPartitionGraphs != false) hash ^= DisableOutputPartitionGraphs.GetHashCode(); + if (XlaFusionAutotunerThresh != 0L) hash ^= XlaFusionAutotunerThresh.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -3198,6 +3558,26 @@ namespace Tensorflow { output.WriteRawTag(80); output.WriteBool(ShareClusterDevicesInSession); } + if (sessionMetadata_ != null) { + output.WriteRawTag(90); + output.WriteMessage(SessionMetadata); + } + if (OptimizeForStaticGraph != false) { + output.WriteRawTag(96); + output.WriteBool(OptimizeForStaticGraph); + } + if (EnableMlirBridge != false) { + output.WriteRawTag(104); + output.WriteBool(EnableMlirBridge); + } + if (DisableOutputPartitionGraphs != false) { + output.WriteRawTag(112); + output.WriteBool(DisableOutputPartitionGraphs); + } + if (XlaFusionAutotunerThresh != 0L) { + output.WriteRawTag(120); + output.WriteInt64(XlaFusionAutotunerThresh); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -3233,6 +3613,21 @@ namespace Tensorflow { if (ShareClusterDevicesInSession != false) { size += 1 + 1; } + if (sessionMetadata_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(SessionMetadata); + } + if (OptimizeForStaticGraph != false) { + size += 1 + 1; + } + if (EnableMlirBridge != false) { + size += 1 + 1; + } + if (DisableOutputPartitionGraphs != false) { + size += 1 + 1; + } + if (XlaFusionAutotunerThresh != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(XlaFusionAutotunerThresh); + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -3271,6 +3666,24 @@ namespace Tensorflow { if (other.ShareClusterDevicesInSession != false) { ShareClusterDevicesInSession = other.ShareClusterDevicesInSession; } + if (other.sessionMetadata_ != null) { + if (sessionMetadata_ == null) { + SessionMetadata = new global::Tensorflow.SessionMetadata(); + } + SessionMetadata.MergeFrom(other.SessionMetadata); + } + if (other.OptimizeForStaticGraph != false) { + OptimizeForStaticGraph = other.OptimizeForStaticGraph; + } + if (other.EnableMlirBridge != false) { + EnableMlirBridge = other.EnableMlirBridge; + } + if (other.DisableOutputPartitionGraphs != false) { + DisableOutputPartitionGraphs = other.DisableOutputPartitionGraphs; + } + if (other.XlaFusionAutotunerThresh != 0L) { + XlaFusionAutotunerThresh = other.XlaFusionAutotunerThresh; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -3318,6 +3731,29 @@ namespace Tensorflow { ShareClusterDevicesInSession = input.ReadBool(); break; } + case 90: { + if (sessionMetadata_ == null) { + SessionMetadata = new global::Tensorflow.SessionMetadata(); + } + input.ReadMessage(SessionMetadata); + break; + } + case 96: { + OptimizeForStaticGraph = input.ReadBool(); + break; + } + case 104: { + EnableMlirBridge = input.ReadBool(); + break; + } + case 112: { + DisableOutputPartitionGraphs = input.ReadBool(); + break; + } + case 120: { + XlaFusionAutotunerThresh = input.ReadInt64(); + break; + } } } } @@ -3340,7 +3776,7 @@ namespace Tensorflow { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { - get { return global::Tensorflow.ConfigReflection.Descriptor.MessageTypes[6]; } + get { return global::Tensorflow.ConfigReflection.Descriptor.MessageTypes[7]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -3374,7 +3810,7 @@ namespace Tensorflow { /// Field number for the "trace_level" field. public const int TraceLevelFieldNumber = 1; - private global::Tensorflow.RunOptions.Types.TraceLevel traceLevel_ = 0; + private global::Tensorflow.RunOptions.Types.TraceLevel traceLevel_ = global::Tensorflow.RunOptions.Types.TraceLevel.NoTrace; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public global::Tensorflow.RunOptions.Types.TraceLevel TraceLevel { get { return traceLevel_; } @@ -3500,7 +3936,7 @@ namespace Tensorflow { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; - if (TraceLevel != 0) hash ^= TraceLevel.GetHashCode(); + if (TraceLevel != global::Tensorflow.RunOptions.Types.TraceLevel.NoTrace) hash ^= TraceLevel.GetHashCode(); if (TimeoutInMs != 0L) hash ^= TimeoutInMs.GetHashCode(); if (InterOpThreadPool != 0) hash ^= InterOpThreadPool.GetHashCode(); if (OutputPartitionGraphs != false) hash ^= OutputPartitionGraphs.GetHashCode(); @@ -3520,7 +3956,7 @@ namespace Tensorflow { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void WriteTo(pb::CodedOutputStream output) { - if (TraceLevel != 0) { + if (TraceLevel != global::Tensorflow.RunOptions.Types.TraceLevel.NoTrace) { output.WriteRawTag(8); output.WriteEnum((int) TraceLevel); } @@ -3556,7 +3992,7 @@ namespace Tensorflow { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int CalculateSize() { int size = 0; - if (TraceLevel != 0) { + if (TraceLevel != global::Tensorflow.RunOptions.Types.TraceLevel.NoTrace) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) TraceLevel); } if (TimeoutInMs != 0L) { @@ -3588,7 +4024,7 @@ namespace Tensorflow { if (other == null) { return; } - if (other.TraceLevel != 0) { + if (other.TraceLevel != global::Tensorflow.RunOptions.Types.TraceLevel.NoTrace) { TraceLevel = other.TraceLevel; } if (other.TimeoutInMs != 0L) { @@ -3602,7 +4038,7 @@ namespace Tensorflow { } if (other.debugOptions_ != null) { if (debugOptions_ == null) { - debugOptions_ = new global::Tensorflow.DebugOptions(); + DebugOptions = new global::Tensorflow.DebugOptions(); } DebugOptions.MergeFrom(other.DebugOptions); } @@ -3611,7 +4047,7 @@ namespace Tensorflow { } if (other.experimental_ != null) { if (experimental_ == null) { - experimental_ = new global::Tensorflow.RunOptions.Types.Experimental(); + Experimental = new global::Tensorflow.RunOptions.Types.Experimental(); } Experimental.MergeFrom(other.Experimental); } @@ -3627,7 +4063,7 @@ namespace Tensorflow { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { - traceLevel_ = (global::Tensorflow.RunOptions.Types.TraceLevel) input.ReadEnum(); + TraceLevel = (global::Tensorflow.RunOptions.Types.TraceLevel) input.ReadEnum(); break; } case 16: { @@ -3644,9 +4080,9 @@ namespace Tensorflow { } case 50: { if (debugOptions_ == null) { - debugOptions_ = new global::Tensorflow.DebugOptions(); + DebugOptions = new global::Tensorflow.DebugOptions(); } - input.ReadMessage(debugOptions_); + input.ReadMessage(DebugOptions); break; } case 56: { @@ -3655,9 +4091,9 @@ namespace Tensorflow { } case 66: { if (experimental_ == null) { - experimental_ = new global::Tensorflow.RunOptions.Types.Experimental(); + Experimental = new global::Tensorflow.RunOptions.Types.Experimental(); } - input.ReadMessage(experimental_); + input.ReadMessage(Experimental); break; } } @@ -3869,7 +4305,7 @@ namespace Tensorflow { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { - get { return global::Tensorflow.ConfigReflection.Descriptor.MessageTypes[7]; } + get { return global::Tensorflow.ConfigReflection.Descriptor.MessageTypes[8]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -4042,13 +4478,13 @@ namespace Tensorflow { } if (other.stepStats_ != null) { if (stepStats_ == null) { - stepStats_ = new global::Tensorflow.StepStats(); + StepStats = new global::Tensorflow.StepStats(); } StepStats.MergeFrom(other.StepStats); } if (other.costGraph_ != null) { if (costGraph_ == null) { - costGraph_ = new global::Tensorflow.CostGraphDef(); + CostGraph = new global::Tensorflow.CostGraphDef(); } CostGraph.MergeFrom(other.CostGraph); } @@ -4067,16 +4503,16 @@ namespace Tensorflow { break; case 10: { if (stepStats_ == null) { - stepStats_ = new global::Tensorflow.StepStats(); + StepStats = new global::Tensorflow.StepStats(); } - input.ReadMessage(stepStats_); + input.ReadMessage(StepStats); break; } case 18: { if (costGraph_ == null) { - costGraph_ = new global::Tensorflow.CostGraphDef(); + CostGraph = new global::Tensorflow.CostGraphDef(); } - input.ReadMessage(costGraph_); + input.ReadMessage(CostGraph); break; } case 26: { @@ -4242,13 +4678,13 @@ namespace Tensorflow { partitionGraphs_.Add(other.partitionGraphs_); if (other.preOptimizationGraph_ != null) { if (preOptimizationGraph_ == null) { - preOptimizationGraph_ = new global::Tensorflow.GraphDef(); + PreOptimizationGraph = new global::Tensorflow.GraphDef(); } PreOptimizationGraph.MergeFrom(other.PreOptimizationGraph); } if (other.postOptimizationGraph_ != null) { if (postOptimizationGraph_ == null) { - postOptimizationGraph_ = new global::Tensorflow.GraphDef(); + PostOptimizationGraph = new global::Tensorflow.GraphDef(); } PostOptimizationGraph.MergeFrom(other.PostOptimizationGraph); } @@ -4269,16 +4705,16 @@ namespace Tensorflow { } case 18: { if (preOptimizationGraph_ == null) { - preOptimizationGraph_ = new global::Tensorflow.GraphDef(); + PreOptimizationGraph = new global::Tensorflow.GraphDef(); } - input.ReadMessage(preOptimizationGraph_); + input.ReadMessage(PreOptimizationGraph); break; } case 26: { if (postOptimizationGraph_ == null) { - postOptimizationGraph_ = new global::Tensorflow.GraphDef(); + PostOptimizationGraph = new global::Tensorflow.GraphDef(); } - input.ReadMessage(postOptimizationGraph_); + input.ReadMessage(PostOptimizationGraph); break; } } @@ -4303,7 +4739,7 @@ namespace Tensorflow { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { - get { return global::Tensorflow.ConfigReflection.Descriptor.MessageTypes[8]; } + get { return global::Tensorflow.ConfigReflection.Descriptor.MessageTypes[9]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -4474,7 +4910,7 @@ namespace Tensorflow { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { - get { return global::Tensorflow.ConfigReflection.Descriptor.MessageTypes[9]; } + get { return global::Tensorflow.ConfigReflection.Descriptor.MessageTypes[10]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -4581,7 +5017,7 @@ namespace Tensorflow { /// Field number for the "feed_devices" field. public const int FeedDevicesFieldNumber = 6; private static readonly pbc::MapField.Codec _map_feedDevices_codec - = new pbc::MapField.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForString(18), 50); + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForString(18, ""), 50); private readonly pbc::MapField feedDevices_ = new pbc::MapField(); /// /// The Tensor objects fed in the callable and fetched from the callable @@ -4640,7 +5076,7 @@ namespace Tensorflow { /// Field number for the "fetch_devices" field. public const int FetchDevicesFieldNumber = 7; private static readonly pbc::MapField.Codec _map_fetchDevices_codec - = new pbc::MapField.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForString(18), 58); + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForString(18, ""), 58); private readonly pbc::MapField fetchDevices_ = new pbc::MapField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public pbc::MapField FetchDevices { @@ -4768,7 +5204,7 @@ namespace Tensorflow { target_.Add(other.target_); if (other.runOptions_ != null) { if (runOptions_ == null) { - runOptions_ = new global::Tensorflow.RunOptions(); + RunOptions = new global::Tensorflow.RunOptions(); } RunOptions.MergeFrom(other.RunOptions); } @@ -4803,9 +5239,9 @@ namespace Tensorflow { } case 34: { if (runOptions_ == null) { - runOptions_ = new global::Tensorflow.RunOptions(); + RunOptions = new global::Tensorflow.RunOptions(); } - input.ReadMessage(runOptions_); + input.ReadMessage(RunOptions); break; } case 42: { diff --git a/src/TensorFlowNET.Core/Protobuf/ControlFlow.cs b/src/TensorFlowNET.Core/Protobuf/ControlFlow.cs index 108bcc45..1fb8c005 100644 --- a/src/TensorFlowNET.Core/Protobuf/ControlFlow.cs +++ b/src/TensorFlowNET.Core/Protobuf/ControlFlow.cs @@ -50,11 +50,11 @@ namespace Tensorflow { "cHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, - new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.ValuesDef), global::Tensorflow.ValuesDef.Parser, new[]{ "Values", "ExternalValues" }, null, null, new pbr::GeneratedClrTypeInfo[] { null, }), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.ControlFlowContextDef), global::Tensorflow.ControlFlowContextDef.Parser, new[]{ "CondCtxt", "WhileCtxt" }, new[]{ "Ctxt" }, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.CondContextDef), global::Tensorflow.CondContextDef.Parser, new[]{ "ContextName", "PredName", "PivotName", "Branch", "ValuesDef", "NestedContexts" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.WhileContextDef), global::Tensorflow.WhileContextDef.Parser, new[]{ "ContextName", "ParallelIterations", "BackProp", "SwapMemory", "PivotName", "PivotForPredName", "PivotForBodyName", "LoopExitNames", "LoopEnterNames", "ValuesDef", "MaximumIterationsName", "NestedContexts" }, null, null, null) + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.ValuesDef), global::Tensorflow.ValuesDef.Parser, new[]{ "Values", "ExternalValues" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, }), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.ControlFlowContextDef), global::Tensorflow.ControlFlowContextDef.Parser, new[]{ "CondCtxt", "WhileCtxt" }, new[]{ "Ctxt" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.CondContextDef), global::Tensorflow.CondContextDef.Parser, new[]{ "ContextName", "PredName", "PivotName", "Branch", "ValuesDef", "NestedContexts" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.WhileContextDef), global::Tensorflow.WhileContextDef.Parser, new[]{ "ContextName", "ParallelIterations", "BackProp", "SwapMemory", "PivotName", "PivotForPredName", "PivotForBodyName", "LoopExitNames", "LoopEnterNames", "ValuesDef", "MaximumIterationsName", "NestedContexts" }, null, null, null, null) })); } #endregion @@ -115,7 +115,7 @@ namespace Tensorflow { /// Field number for the "external_values" field. public const int ExternalValuesFieldNumber = 2; private static readonly pbc::MapField.Codec _map_externalValues_codec - = new pbc::MapField.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForString(18), 18); + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForString(18, ""), 18); private readonly pbc::MapField externalValues_ = new pbc::MapField(); /// /// Value names referenced by but external to this context. @@ -658,7 +658,7 @@ namespace Tensorflow { } if (other.valuesDef_ != null) { if (valuesDef_ == null) { - valuesDef_ = new global::Tensorflow.ValuesDef(); + ValuesDef = new global::Tensorflow.ValuesDef(); } ValuesDef.MergeFrom(other.ValuesDef); } @@ -692,9 +692,9 @@ namespace Tensorflow { } case 42: { if (valuesDef_ == null) { - valuesDef_ = new global::Tensorflow.ValuesDef(); + ValuesDef = new global::Tensorflow.ValuesDef(); } - input.ReadMessage(valuesDef_); + input.ReadMessage(ValuesDef); break; } case 50: { @@ -1089,7 +1089,7 @@ namespace Tensorflow { loopEnterNames_.Add(other.loopEnterNames_); if (other.valuesDef_ != null) { if (valuesDef_ == null) { - valuesDef_ = new global::Tensorflow.ValuesDef(); + ValuesDef = new global::Tensorflow.ValuesDef(); } ValuesDef.MergeFrom(other.ValuesDef); } @@ -1142,9 +1142,9 @@ namespace Tensorflow { } case 74: { if (valuesDef_ == null) { - valuesDef_ = new global::Tensorflow.ValuesDef(); + ValuesDef = new global::Tensorflow.ValuesDef(); } - input.ReadMessage(valuesDef_); + input.ReadMessage(ValuesDef); break; } case 82: { diff --git a/src/TensorFlowNET.Core/Protobuf/CostGraph.cs b/src/TensorFlowNET.Core/Protobuf/CostGraph.cs index 0d7f0ba7..fba4c65a 100644 --- a/src/TensorFlowNET.Core/Protobuf/CostGraph.cs +++ b/src/TensorFlowNET.Core/Protobuf/CostGraph.cs @@ -49,9 +49,9 @@ namespace Tensorflow { "+AEBYgZwcm90bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Tensorflow.TensorShapeReflection.Descriptor, global::Tensorflow.TypesReflection.Descriptor, }, - new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.CostGraphDef), global::Tensorflow.CostGraphDef.Parser, new[]{ "Node" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.CostGraphDef.Types.Node), global::Tensorflow.CostGraphDef.Types.Node.Parser, new[]{ "Name", "Device", "Id", "InputInfo", "OutputInfo", "TemporaryMemorySize", "PersistentMemorySize", "HostTempMemorySize", "DeviceTempMemorySize", "DevicePersistentMemorySize", "ComputeCost", "ComputeTime", "MemoryTime", "IsFinal", "ControlInput", "Inaccurate" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.CostGraphDef.Types.Node.Types.InputInfo), global::Tensorflow.CostGraphDef.Types.Node.Types.InputInfo.Parser, new[]{ "PrecedingNode", "PrecedingPort" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.CostGraphDef.Types.Node.Types.OutputInfo), global::Tensorflow.CostGraphDef.Types.Node.Types.OutputInfo.Parser, new[]{ "Size", "AliasInputPort", "Shape", "Dtype" }, null, null, null)})}) + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.CostGraphDef), global::Tensorflow.CostGraphDef.Parser, new[]{ "Node" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.CostGraphDef.Types.Node), global::Tensorflow.CostGraphDef.Types.Node.Parser, new[]{ "Name", "Device", "Id", "InputInfo", "OutputInfo", "TemporaryMemorySize", "PersistentMemorySize", "HostTempMemorySize", "DeviceTempMemorySize", "DevicePersistentMemorySize", "ComputeCost", "ComputeTime", "MemoryTime", "IsFinal", "ControlInput", "Inaccurate" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.CostGraphDef.Types.Node.Types.InputInfo), global::Tensorflow.CostGraphDef.Types.Node.Types.InputInfo.Parser, new[]{ "PrecedingNode", "PrecedingPort" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.CostGraphDef.Types.Node.Types.OutputInfo), global::Tensorflow.CostGraphDef.Types.Node.Types.OutputInfo.Parser, new[]{ "Size", "AliasInputPort", "Shape", "Dtype" }, null, null, null, null)})}) })); } #endregion @@ -991,7 +991,7 @@ namespace Tensorflow { /// Field number for the "dtype" field. public const int DtypeFieldNumber = 4; - private global::Tensorflow.DataType dtype_ = 0; + private global::Tensorflow.DataType dtype_ = global::Tensorflow.DataType.DtInvalid; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public global::Tensorflow.DataType Dtype { get { return dtype_; } @@ -1026,7 +1026,7 @@ namespace Tensorflow { if (Size != 0L) hash ^= Size.GetHashCode(); if (AliasInputPort != 0L) hash ^= AliasInputPort.GetHashCode(); if (shape_ != null) hash ^= Shape.GetHashCode(); - if (Dtype != 0) hash ^= Dtype.GetHashCode(); + if (Dtype != global::Tensorflow.DataType.DtInvalid) hash ^= Dtype.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -1052,7 +1052,7 @@ namespace Tensorflow { output.WriteRawTag(26); output.WriteMessage(Shape); } - if (Dtype != 0) { + if (Dtype != global::Tensorflow.DataType.DtInvalid) { output.WriteRawTag(32); output.WriteEnum((int) Dtype); } @@ -1073,7 +1073,7 @@ namespace Tensorflow { if (shape_ != null) { size += 1 + pb::CodedOutputStream.ComputeMessageSize(Shape); } - if (Dtype != 0) { + if (Dtype != global::Tensorflow.DataType.DtInvalid) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Dtype); } if (_unknownFields != null) { @@ -1095,11 +1095,11 @@ namespace Tensorflow { } if (other.shape_ != null) { if (shape_ == null) { - shape_ = new global::Tensorflow.TensorShapeProto(); + Shape = new global::Tensorflow.TensorShapeProto(); } Shape.MergeFrom(other.Shape); } - if (other.Dtype != 0) { + if (other.Dtype != global::Tensorflow.DataType.DtInvalid) { Dtype = other.Dtype; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); @@ -1123,13 +1123,13 @@ namespace Tensorflow { } case 26: { if (shape_ == null) { - shape_ = new global::Tensorflow.TensorShapeProto(); + Shape = new global::Tensorflow.TensorShapeProto(); } - input.ReadMessage(shape_); + input.ReadMessage(Shape); break; } case 32: { - dtype_ = (global::Tensorflow.DataType) input.ReadEnum(); + Dtype = (global::Tensorflow.DataType) input.ReadEnum(); break; } } diff --git a/src/TensorFlowNET.Core/Protobuf/Debug.cs b/src/TensorFlowNET.Core/Protobuf/Debug.cs index 5e39a0b8..885fcfab 100644 --- a/src/TensorFlowNET.Core/Protobuf/Debug.cs +++ b/src/TensorFlowNET.Core/Protobuf/Debug.cs @@ -40,11 +40,11 @@ namespace Tensorflow { "Zmxvdy90ZW5zb3JmbG93L2dvL2NvcmUvcHJvdG9idWb4AQFiBnByb3RvMw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, - new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.DebugTensorWatch), global::Tensorflow.DebugTensorWatch.Parser, new[]{ "NodeName", "OutputSlot", "DebugOps", "DebugUrls", "TolerateDebugOpCreationFailures" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.DebugOptions), global::Tensorflow.DebugOptions.Parser, new[]{ "DebugTensorWatchOpts", "GlobalStep", "ResetDiskByteUsage" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.DebuggedSourceFile), global::Tensorflow.DebuggedSourceFile.Parser, new[]{ "Host", "FilePath", "LastModified", "Bytes", "Lines" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.DebuggedSourceFiles), global::Tensorflow.DebuggedSourceFiles.Parser, new[]{ "SourceFiles" }, null, null, null) + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.DebugTensorWatch), global::Tensorflow.DebugTensorWatch.Parser, new[]{ "NodeName", "OutputSlot", "DebugOps", "DebugUrls", "TolerateDebugOpCreationFailures" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.DebugOptions), global::Tensorflow.DebugOptions.Parser, new[]{ "DebugTensorWatchOpts", "GlobalStep", "ResetDiskByteUsage" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.DebuggedSourceFile), global::Tensorflow.DebuggedSourceFile.Parser, new[]{ "Host", "FilePath", "LastModified", "Bytes", "Lines" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.DebuggedSourceFiles), global::Tensorflow.DebuggedSourceFiles.Parser, new[]{ "SourceFiles" }, null, null, null, null) })); } #endregion @@ -97,6 +97,8 @@ namespace Tensorflow { private string nodeName_ = ""; /// /// Name of the node to watch. + /// Use "*" for wildcard. But note: currently, regex is not supported in + /// general. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public string NodeName { @@ -111,10 +113,10 @@ namespace Tensorflow { private int outputSlot_; /// /// Output slot to watch. - /// The semantics of output_slot == -1 is that the node is only watched for - /// completion, but not for any output tensors. See NodeCompletionCallback - /// in debug_gateway.h. - /// TODO(cais): Implement this semantics. + /// The semantics of output_slot == -1 is that all outputs of the node + /// will be watched (i.e., a wildcard). + /// Other negative values of output_slot are invalid and will lead to + /// errors currently. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int OutputSlot { diff --git a/src/TensorFlowNET.Core/Protobuf/DeviceAttributes.cs b/src/TensorFlowNET.Core/Protobuf/DeviceAttributes.cs index aafe9dfd..31e2ac34 100644 --- a/src/TensorFlowNET.Core/Protobuf/DeviceAttributes.cs +++ b/src/TensorFlowNET.Core/Protobuf/DeviceAttributes.cs @@ -40,11 +40,11 @@ namespace Tensorflow { "bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, - new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.InterconnectLink), global::Tensorflow.InterconnectLink.Parser, new[]{ "DeviceId", "Type", "Strength" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.LocalLinks), global::Tensorflow.LocalLinks.Parser, new[]{ "Link" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.DeviceLocality), global::Tensorflow.DeviceLocality.Parser, new[]{ "BusId", "NumaNode", "Links" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.DeviceAttributes), global::Tensorflow.DeviceAttributes.Parser, new[]{ "Name", "DeviceType", "MemoryLimit", "Locality", "Incarnation", "PhysicalDeviceDesc" }, null, null, null) + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.InterconnectLink), global::Tensorflow.InterconnectLink.Parser, new[]{ "DeviceId", "Type", "Strength" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.LocalLinks), global::Tensorflow.LocalLinks.Parser, new[]{ "Link" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.DeviceLocality), global::Tensorflow.DeviceLocality.Parser, new[]{ "BusId", "NumaNode", "Links" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.DeviceAttributes), global::Tensorflow.DeviceAttributes.Parser, new[]{ "Name", "DeviceType", "MemoryLimit", "Locality", "Incarnation", "PhysicalDeviceDesc" }, null, null, null, null) })); } #endregion @@ -522,7 +522,7 @@ namespace Tensorflow { } if (other.links_ != null) { if (links_ == null) { - links_ = new global::Tensorflow.LocalLinks(); + Links = new global::Tensorflow.LocalLinks(); } Links.MergeFrom(other.Links); } @@ -547,9 +547,9 @@ namespace Tensorflow { } case 26: { if (links_ == null) { - links_ = new global::Tensorflow.LocalLinks(); + Links = new global::Tensorflow.LocalLinks(); } - input.ReadMessage(links_); + input.ReadMessage(Links); break; } } @@ -799,7 +799,7 @@ namespace Tensorflow { } if (other.locality_ != null) { if (locality_ == null) { - locality_ = new global::Tensorflow.DeviceLocality(); + Locality = new global::Tensorflow.DeviceLocality(); } Locality.MergeFrom(other.Locality); } @@ -834,9 +834,9 @@ namespace Tensorflow { } case 42: { if (locality_ == null) { - locality_ = new global::Tensorflow.DeviceLocality(); + Locality = new global::Tensorflow.DeviceLocality(); } - input.ReadMessage(locality_); + input.ReadMessage(Locality); break; } case 49: { diff --git a/src/TensorFlowNET.Core/Protobuf/Event.cs b/src/TensorFlowNET.Core/Protobuf/Event.cs index d9348c95..37b1eece 100644 --- a/src/TensorFlowNET.Core/Protobuf/Event.cs +++ b/src/TensorFlowNET.Core/Protobuf/Event.cs @@ -42,10 +42,12 @@ namespace Tensorflow { "c2lvblN0YXR1cxIWChJTVEFUVVNfVU5TUEVDSUZJRUQQABIJCgVTVEFSVBAB", "EggKBFNUT1AQAhIOCgpDSEVDS1BPSU5UEAMiNgoRVGFnZ2VkUnVuTWV0YWRh", "dGESCwoDdGFnGAEgASgJEhQKDHJ1bl9tZXRhZGF0YRgCIAEoDCIkCg5XYXRj", - "aGRvZ0NvbmZpZxISCgp0aW1lb3V0X21zGAEgASgDIoQBChZXb3JrZXJIZWFy", - "dGJlYXRSZXF1ZXN0EjUKDXNodXRkb3duX21vZGUYASABKA4yHi50ZW5zb3Jm", - "bG93LldvcmtlclNodXRkb3duTW9kZRIzCg93YXRjaGRvZ19jb25maWcYAiAB", - "KAsyGi50ZW5zb3JmbG93LldhdGNoZG9nQ29uZmlnIoMBChdXb3JrZXJIZWFy", + "aGRvZ0NvbmZpZxISCgp0aW1lb3V0X21zGAEgASgDIiYKEVJlcXVlc3RlZEV4", + "aXRDb2RlEhEKCWV4aXRfY29kZRgBIAEoBSK2AQoWV29ya2VySGVhcnRiZWF0", + "UmVxdWVzdBI1Cg1zaHV0ZG93bl9tb2RlGAEgASgOMh4udGVuc29yZmxvdy5X", + "b3JrZXJTaHV0ZG93bk1vZGUSMwoPd2F0Y2hkb2dfY29uZmlnGAIgASgLMhou", + "dGVuc29yZmxvdy5XYXRjaGRvZ0NvbmZpZxIwCglleGl0X2NvZGUYAyABKAsy", + "HS50ZW5zb3JmbG93LlJlcXVlc3RlZEV4aXRDb2RlIoMBChdXb3JrZXJIZWFy", "dGJlYXRSZXNwb25zZRIvCg1oZWFsdGhfc3RhdHVzGAEgASgOMhgudGVuc29y", "Zmxvdy5Xb3JrZXJIZWFsdGgSJQoKd29ya2VyX2xvZxgCIAMoCzIRLnRlbnNv", "cmZsb3cuRXZlbnQSEAoIaG9zdG5hbWUYAyABKAkqWwoMV29ya2VySGVhbHRo", @@ -57,14 +59,15 @@ namespace Tensorflow { "AQFiBnByb3RvMw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Tensorflow.SummaryReflection.Descriptor, }, - new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Tensorflow.WorkerHealth), typeof(global::Tensorflow.WorkerShutdownMode), }, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Event), global::Tensorflow.Event.Parser, new[]{ "WallTime", "Step", "FileVersion", "GraphDef", "Summary", "LogMessage", "SessionLog", "TaggedRunMetadata", "MetaGraphDef" }, new[]{ "What" }, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.LogMessage), global::Tensorflow.LogMessage.Parser, new[]{ "Level", "Message" }, null, new[]{ typeof(global::Tensorflow.LogMessage.Types.Level) }, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.SessionLog), global::Tensorflow.SessionLog.Parser, new[]{ "Status", "CheckpointPath", "Msg" }, null, new[]{ typeof(global::Tensorflow.SessionLog.Types.SessionStatus) }, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.TaggedRunMetadata), global::Tensorflow.TaggedRunMetadata.Parser, new[]{ "Tag", "RunMetadata" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.WatchdogConfig), global::Tensorflow.WatchdogConfig.Parser, new[]{ "TimeoutMs" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.WorkerHeartbeatRequest), global::Tensorflow.WorkerHeartbeatRequest.Parser, new[]{ "ShutdownMode", "WatchdogConfig" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.WorkerHeartbeatResponse), global::Tensorflow.WorkerHeartbeatResponse.Parser, new[]{ "HealthStatus", "WorkerLog", "Hostname" }, null, null, null) + new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Tensorflow.WorkerHealth), typeof(global::Tensorflow.WorkerShutdownMode), }, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Event), global::Tensorflow.Event.Parser, new[]{ "WallTime", "Step", "FileVersion", "GraphDef", "Summary", "LogMessage", "SessionLog", "TaggedRunMetadata", "MetaGraphDef" }, new[]{ "What" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.LogMessage), global::Tensorflow.LogMessage.Parser, new[]{ "Level", "Message" }, null, new[]{ typeof(global::Tensorflow.LogMessage.Types.Level) }, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.SessionLog), global::Tensorflow.SessionLog.Parser, new[]{ "Status", "CheckpointPath", "Msg" }, null, new[]{ typeof(global::Tensorflow.SessionLog.Types.SessionStatus) }, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.TaggedRunMetadata), global::Tensorflow.TaggedRunMetadata.Parser, new[]{ "Tag", "RunMetadata" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.WatchdogConfig), global::Tensorflow.WatchdogConfig.Parser, new[]{ "TimeoutMs" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.RequestedExitCode), global::Tensorflow.RequestedExitCode.Parser, new[]{ "ExitCode" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.WorkerHeartbeatRequest), global::Tensorflow.WorkerHeartbeatRequest.Parser, new[]{ "ShutdownMode", "WatchdogConfig", "ExitCode" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.WorkerHeartbeatResponse), global::Tensorflow.WorkerHeartbeatResponse.Parser, new[]{ "HealthStatus", "WorkerLog", "Hostname" }, null, null, null, null) })); } #endregion @@ -607,7 +610,7 @@ namespace Tensorflow { /// Field number for the "level" field. public const int LevelFieldNumber = 1; - private global::Tensorflow.LogMessage.Types.Level level_ = 0; + private global::Tensorflow.LogMessage.Types.Level level_ = global::Tensorflow.LogMessage.Types.Level.Unknown; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public global::Tensorflow.LogMessage.Types.Level Level { get { return level_; } @@ -648,7 +651,7 @@ namespace Tensorflow { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; - if (Level != 0) hash ^= Level.GetHashCode(); + if (Level != global::Tensorflow.LogMessage.Types.Level.Unknown) hash ^= Level.GetHashCode(); if (Message.Length != 0) hash ^= Message.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); @@ -663,7 +666,7 @@ namespace Tensorflow { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void WriteTo(pb::CodedOutputStream output) { - if (Level != 0) { + if (Level != global::Tensorflow.LogMessage.Types.Level.Unknown) { output.WriteRawTag(8); output.WriteEnum((int) Level); } @@ -679,7 +682,7 @@ namespace Tensorflow { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int CalculateSize() { int size = 0; - if (Level != 0) { + if (Level != global::Tensorflow.LogMessage.Types.Level.Unknown) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Level); } if (Message.Length != 0) { @@ -696,7 +699,7 @@ namespace Tensorflow { if (other == null) { return; } - if (other.Level != 0) { + if (other.Level != global::Tensorflow.LogMessage.Types.Level.Unknown) { Level = other.Level; } if (other.Message.Length != 0) { @@ -714,7 +717,7 @@ namespace Tensorflow { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { - level_ = (global::Tensorflow.LogMessage.Types.Level) input.ReadEnum(); + Level = (global::Tensorflow.LogMessage.Types.Level) input.ReadEnum(); break; } case 18: { @@ -790,7 +793,7 @@ namespace Tensorflow { /// Field number for the "status" field. public const int StatusFieldNumber = 1; - private global::Tensorflow.SessionLog.Types.SessionStatus status_ = 0; + private global::Tensorflow.SessionLog.Types.SessionStatus status_ = global::Tensorflow.SessionLog.Types.SessionStatus.StatusUnspecified; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public global::Tensorflow.SessionLog.Types.SessionStatus Status { get { return status_; } @@ -846,7 +849,7 @@ namespace Tensorflow { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; - if (Status != 0) hash ^= Status.GetHashCode(); + if (Status != global::Tensorflow.SessionLog.Types.SessionStatus.StatusUnspecified) hash ^= Status.GetHashCode(); if (CheckpointPath.Length != 0) hash ^= CheckpointPath.GetHashCode(); if (Msg.Length != 0) hash ^= Msg.GetHashCode(); if (_unknownFields != null) { @@ -862,7 +865,7 @@ namespace Tensorflow { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void WriteTo(pb::CodedOutputStream output) { - if (Status != 0) { + if (Status != global::Tensorflow.SessionLog.Types.SessionStatus.StatusUnspecified) { output.WriteRawTag(8); output.WriteEnum((int) Status); } @@ -882,7 +885,7 @@ namespace Tensorflow { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int CalculateSize() { int size = 0; - if (Status != 0) { + if (Status != global::Tensorflow.SessionLog.Types.SessionStatus.StatusUnspecified) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Status); } if (CheckpointPath.Length != 0) { @@ -902,7 +905,7 @@ namespace Tensorflow { if (other == null) { return; } - if (other.Status != 0) { + if (other.Status != global::Tensorflow.SessionLog.Types.SessionStatus.StatusUnspecified) { Status = other.Status; } if (other.CheckpointPath.Length != 0) { @@ -923,7 +926,7 @@ namespace Tensorflow { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { - status_ = (global::Tensorflow.SessionLog.Types.SessionStatus) input.ReadEnum(); + Status = (global::Tensorflow.SessionLog.Types.SessionStatus) input.ReadEnum(); break; } case 18: { @@ -1250,6 +1253,135 @@ namespace Tensorflow { } + public sealed partial class RequestedExitCode : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RequestedExitCode()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.EventReflection.Descriptor.MessageTypes[5]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RequestedExitCode() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RequestedExitCode(RequestedExitCode other) : this() { + exitCode_ = other.exitCode_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RequestedExitCode Clone() { + return new RequestedExitCode(this); + } + + /// Field number for the "exit_code" field. + public const int ExitCodeFieldNumber = 1; + private int exitCode_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int ExitCode { + get { return exitCode_; } + set { + exitCode_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as RequestedExitCode); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(RequestedExitCode other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (ExitCode != other.ExitCode) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (ExitCode != 0) hash ^= ExitCode.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (ExitCode != 0) { + output.WriteRawTag(8); + output.WriteInt32(ExitCode); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (ExitCode != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(ExitCode); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(RequestedExitCode other) { + if (other == null) { + return; + } + if (other.ExitCode != 0) { + ExitCode = other.ExitCode; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + ExitCode = input.ReadInt32(); + break; + } + } + } + } + + } + public sealed partial class WorkerHeartbeatRequest : pb::IMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new WorkerHeartbeatRequest()); private pb::UnknownFieldSet _unknownFields; @@ -1258,7 +1390,7 @@ namespace Tensorflow { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { - get { return global::Tensorflow.EventReflection.Descriptor.MessageTypes[5]; } + get { return global::Tensorflow.EventReflection.Descriptor.MessageTypes[6]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1277,6 +1409,7 @@ namespace Tensorflow { public WorkerHeartbeatRequest(WorkerHeartbeatRequest other) : this() { shutdownMode_ = other.shutdownMode_; watchdogConfig_ = other.watchdogConfig_ != null ? other.watchdogConfig_.Clone() : null; + exitCode_ = other.exitCode_ != null ? other.exitCode_.Clone() : null; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -1287,7 +1420,7 @@ namespace Tensorflow { /// Field number for the "shutdown_mode" field. public const int ShutdownModeFieldNumber = 1; - private global::Tensorflow.WorkerShutdownMode shutdownMode_ = 0; + private global::Tensorflow.WorkerShutdownMode shutdownMode_ = global::Tensorflow.WorkerShutdownMode.Default; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public global::Tensorflow.WorkerShutdownMode ShutdownMode { get { return shutdownMode_; } @@ -1307,6 +1440,17 @@ namespace Tensorflow { } } + /// Field number for the "exit_code" field. + public const int ExitCodeFieldNumber = 3; + private global::Tensorflow.RequestedExitCode exitCode_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.RequestedExitCode ExitCode { + get { return exitCode_; } + set { + exitCode_ = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as WorkerHeartbeatRequest); @@ -1322,14 +1466,16 @@ namespace Tensorflow { } if (ShutdownMode != other.ShutdownMode) return false; if (!object.Equals(WatchdogConfig, other.WatchdogConfig)) return false; + if (!object.Equals(ExitCode, other.ExitCode)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; - if (ShutdownMode != 0) hash ^= ShutdownMode.GetHashCode(); + if (ShutdownMode != global::Tensorflow.WorkerShutdownMode.Default) hash ^= ShutdownMode.GetHashCode(); if (watchdogConfig_ != null) hash ^= WatchdogConfig.GetHashCode(); + if (exitCode_ != null) hash ^= ExitCode.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -1343,7 +1489,7 @@ namespace Tensorflow { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void WriteTo(pb::CodedOutputStream output) { - if (ShutdownMode != 0) { + if (ShutdownMode != global::Tensorflow.WorkerShutdownMode.Default) { output.WriteRawTag(8); output.WriteEnum((int) ShutdownMode); } @@ -1351,6 +1497,10 @@ namespace Tensorflow { output.WriteRawTag(18); output.WriteMessage(WatchdogConfig); } + if (exitCode_ != null) { + output.WriteRawTag(26); + output.WriteMessage(ExitCode); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -1359,12 +1509,15 @@ namespace Tensorflow { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int CalculateSize() { int size = 0; - if (ShutdownMode != 0) { + if (ShutdownMode != global::Tensorflow.WorkerShutdownMode.Default) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ShutdownMode); } if (watchdogConfig_ != null) { size += 1 + pb::CodedOutputStream.ComputeMessageSize(WatchdogConfig); } + if (exitCode_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ExitCode); + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -1376,15 +1529,21 @@ namespace Tensorflow { if (other == null) { return; } - if (other.ShutdownMode != 0) { + if (other.ShutdownMode != global::Tensorflow.WorkerShutdownMode.Default) { ShutdownMode = other.ShutdownMode; } if (other.watchdogConfig_ != null) { if (watchdogConfig_ == null) { - watchdogConfig_ = new global::Tensorflow.WatchdogConfig(); + WatchdogConfig = new global::Tensorflow.WatchdogConfig(); } WatchdogConfig.MergeFrom(other.WatchdogConfig); } + if (other.exitCode_ != null) { + if (exitCode_ == null) { + ExitCode = new global::Tensorflow.RequestedExitCode(); + } + ExitCode.MergeFrom(other.ExitCode); + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -1397,14 +1556,21 @@ namespace Tensorflow { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { - shutdownMode_ = (global::Tensorflow.WorkerShutdownMode) input.ReadEnum(); + ShutdownMode = (global::Tensorflow.WorkerShutdownMode) input.ReadEnum(); break; } case 18: { if (watchdogConfig_ == null) { - watchdogConfig_ = new global::Tensorflow.WatchdogConfig(); + WatchdogConfig = new global::Tensorflow.WatchdogConfig(); } - input.ReadMessage(watchdogConfig_); + input.ReadMessage(WatchdogConfig); + break; + } + case 26: { + if (exitCode_ == null) { + ExitCode = new global::Tensorflow.RequestedExitCode(); + } + input.ReadMessage(ExitCode); break; } } @@ -1421,7 +1587,7 @@ namespace Tensorflow { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { - get { return global::Tensorflow.EventReflection.Descriptor.MessageTypes[6]; } + get { return global::Tensorflow.EventReflection.Descriptor.MessageTypes[7]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1451,7 +1617,7 @@ namespace Tensorflow { /// Field number for the "health_status" field. public const int HealthStatusFieldNumber = 1; - private global::Tensorflow.WorkerHealth healthStatus_ = 0; + private global::Tensorflow.WorkerHealth healthStatus_ = global::Tensorflow.WorkerHealth.Ok; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public global::Tensorflow.WorkerHealth HealthStatus { get { return healthStatus_; } @@ -1503,7 +1669,7 @@ namespace Tensorflow { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; - if (HealthStatus != 0) hash ^= HealthStatus.GetHashCode(); + if (HealthStatus != global::Tensorflow.WorkerHealth.Ok) hash ^= HealthStatus.GetHashCode(); hash ^= workerLog_.GetHashCode(); if (Hostname.Length != 0) hash ^= Hostname.GetHashCode(); if (_unknownFields != null) { @@ -1519,7 +1685,7 @@ namespace Tensorflow { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void WriteTo(pb::CodedOutputStream output) { - if (HealthStatus != 0) { + if (HealthStatus != global::Tensorflow.WorkerHealth.Ok) { output.WriteRawTag(8); output.WriteEnum((int) HealthStatus); } @@ -1536,7 +1702,7 @@ namespace Tensorflow { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int CalculateSize() { int size = 0; - if (HealthStatus != 0) { + if (HealthStatus != global::Tensorflow.WorkerHealth.Ok) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) HealthStatus); } size += workerLog_.CalculateSize(_repeated_workerLog_codec); @@ -1554,7 +1720,7 @@ namespace Tensorflow { if (other == null) { return; } - if (other.HealthStatus != 0) { + if (other.HealthStatus != global::Tensorflow.WorkerHealth.Ok) { HealthStatus = other.HealthStatus; } workerLog_.Add(other.workerLog_); @@ -1573,7 +1739,7 @@ namespace Tensorflow { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { - healthStatus_ = (global::Tensorflow.WorkerHealth) input.ReadEnum(); + HealthStatus = (global::Tensorflow.WorkerHealth) input.ReadEnum(); break; } case 18: { diff --git a/src/TensorFlowNET.Core/Protobuf/Function.cs b/src/TensorFlowNET.Core/Protobuf/Function.cs index 22a9011b..7ca65b65 100644 --- a/src/TensorFlowNET.Core/Protobuf/Function.cs +++ b/src/TensorFlowNET.Core/Protobuf/Function.cs @@ -30,24 +30,33 @@ namespace Tensorflow { "cHJvdG8aJnRlbnNvcmZsb3cvY29yZS9mcmFtZXdvcmsvb3BfZGVmLnByb3Rv", "ImoKEkZ1bmN0aW9uRGVmTGlicmFyeRIpCghmdW5jdGlvbhgBIAMoCzIXLnRl", "bnNvcmZsb3cuRnVuY3Rpb25EZWYSKQoIZ3JhZGllbnQYAiADKAsyFy50ZW5z", - "b3JmbG93LkdyYWRpZW50RGVmIrACCgtGdW5jdGlvbkRlZhIkCglzaWduYXR1", + "b3JmbG93LkdyYWRpZW50RGVmIrYFCgtGdW5jdGlvbkRlZhIkCglzaWduYXR1", "cmUYASABKAsyES50ZW5zb3JmbG93Lk9wRGVmEi8KBGF0dHIYBSADKAsyIS50", - "ZW5zb3JmbG93LkZ1bmN0aW9uRGVmLkF0dHJFbnRyeRIlCghub2RlX2RlZhgD", - "IAMoCzITLnRlbnNvcmZsb3cuTm9kZURlZhItCgNyZXQYBCADKAsyIC50ZW5z", - "b3JmbG93LkZ1bmN0aW9uRGVmLlJldEVudHJ5GkIKCUF0dHJFbnRyeRILCgNr", - "ZXkYASABKAkSJAoFdmFsdWUYAiABKAsyFS50ZW5zb3JmbG93LkF0dHJWYWx1", - "ZToCOAEaKgoIUmV0RW50cnkSCwoDa2V5GAEgASgJEg0KBXZhbHVlGAIgASgJ", - "OgI4AUoECAIQAyI7CgtHcmFkaWVudERlZhIVCg1mdW5jdGlvbl9uYW1lGAEg", - "ASgJEhUKDWdyYWRpZW50X2Z1bmMYAiABKAlCbgoYb3JnLnRlbnNvcmZsb3cu", - "ZnJhbWV3b3JrQg5GdW5jdGlvblByb3Rvc1ABWj1naXRodWIuY29tL3RlbnNv", - "cmZsb3cvdGVuc29yZmxvdy90ZW5zb3JmbG93L2dvL2NvcmUvZnJhbWV3b3Jr", - "+AEBYgZwcm90bzM=")); + "ZW5zb3JmbG93LkZ1bmN0aW9uRGVmLkF0dHJFbnRyeRI2CghhcmdfYXR0chgH", + "IAMoCzIkLnRlbnNvcmZsb3cuRnVuY3Rpb25EZWYuQXJnQXR0ckVudHJ5EiUK", + "CG5vZGVfZGVmGAMgAygLMhMudGVuc29yZmxvdy5Ob2RlRGVmEi0KA3JldBgE", + "IAMoCzIgLnRlbnNvcmZsb3cuRnVuY3Rpb25EZWYuUmV0RW50cnkSPAoLY29u", + "dHJvbF9yZXQYBiADKAsyJy50ZW5zb3JmbG93LkZ1bmN0aW9uRGVmLkNvbnRy", + "b2xSZXRFbnRyeRpCCglBdHRyRW50cnkSCwoDa2V5GAEgASgJEiQKBXZhbHVl", + "GAIgASgLMhUudGVuc29yZmxvdy5BdHRyVmFsdWU6AjgBGogBCghBcmdBdHRy", + "cxI4CgRhdHRyGAEgAygLMioudGVuc29yZmxvdy5GdW5jdGlvbkRlZi5BcmdB", + "dHRycy5BdHRyRW50cnkaQgoJQXR0ckVudHJ5EgsKA2tleRgBIAEoCRIkCgV2", + "YWx1ZRgCIAEoCzIVLnRlbnNvcmZsb3cuQXR0clZhbHVlOgI4ARpQCgxBcmdB", + "dHRyRW50cnkSCwoDa2V5GAEgASgNEi8KBXZhbHVlGAIgASgLMiAudGVuc29y", + "Zmxvdy5GdW5jdGlvbkRlZi5BcmdBdHRyczoCOAEaKgoIUmV0RW50cnkSCwoD", + "a2V5GAEgASgJEg0KBXZhbHVlGAIgASgJOgI4ARoxCg9Db250cm9sUmV0RW50", + "cnkSCwoDa2V5GAEgASgJEg0KBXZhbHVlGAIgASgJOgI4AUoECAIQAyI7CgtH", + "cmFkaWVudERlZhIVCg1mdW5jdGlvbl9uYW1lGAEgASgJEhUKDWdyYWRpZW50", + "X2Z1bmMYAiABKAlCbgoYb3JnLnRlbnNvcmZsb3cuZnJhbWV3b3JrQg5GdW5j", + "dGlvblByb3Rvc1ABWj1naXRodWIuY29tL3RlbnNvcmZsb3cvdGVuc29yZmxv", + "dy90ZW5zb3JmbG93L2dvL2NvcmUvZnJhbWV3b3Jr+AEBYgZwcm90bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Tensorflow.AttrValueReflection.Descriptor, global::Tensorflow.NodeDefReflection.Descriptor, global::Tensorflow.OpDefReflection.Descriptor, }, - new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.FunctionDefLibrary), global::Tensorflow.FunctionDefLibrary.Parser, new[]{ "Function", "Gradient" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.FunctionDef), global::Tensorflow.FunctionDef.Parser, new[]{ "Signature", "Attr", "NodeDef", "Ret" }, null, null, new pbr::GeneratedClrTypeInfo[] { null, null, }), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.GradientDef), global::Tensorflow.GradientDef.Parser, new[]{ "FunctionName", "GradientFunc" }, null, null, null) + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.FunctionDefLibrary), global::Tensorflow.FunctionDefLibrary.Parser, new[]{ "Function", "Gradient" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.FunctionDef), global::Tensorflow.FunctionDef.Parser, new[]{ "Signature", "Attr", "ArgAttr", "NodeDef", "Ret", "ControlRet" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.FunctionDef.Types.ArgAttrs), global::Tensorflow.FunctionDef.Types.ArgAttrs.Parser, new[]{ "Attr" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, }), + null, null, null, }), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.GradientDef), global::Tensorflow.GradientDef.Parser, new[]{ "FunctionName", "GradientFunc" }, null, null, null, null) })); } #endregion @@ -233,8 +242,10 @@ namespace Tensorflow { public FunctionDef(FunctionDef other) : this() { signature_ = other.signature_ != null ? other.signature_.Clone() : null; attr_ = other.attr_.Clone(); + argAttr_ = other.argAttr_.Clone(); nodeDef_ = other.nodeDef_.Clone(); ret_ = other.ret_.Clone(); + controlRet_ = other.controlRet_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -261,7 +272,7 @@ namespace Tensorflow { /// Field number for the "attr" field. public const int AttrFieldNumber = 5; private static readonly pbc::MapField.Codec _map_attr_codec - = new pbc::MapField.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForMessage(18, global::Tensorflow.AttrValue.Parser), 42); + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForMessage(18, global::Tensorflow.AttrValue.Parser), 42); private readonly pbc::MapField attr_ = new pbc::MapField(); /// /// Attributes specific to this function definition. @@ -271,6 +282,16 @@ namespace Tensorflow { get { return attr_; } } + /// Field number for the "arg_attr" field. + public const int ArgAttrFieldNumber = 7; + private static readonly pbc::MapField.Codec _map_argAttr_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForUInt32(8, 0), pb::FieldCodec.ForMessage(18, global::Tensorflow.FunctionDef.Types.ArgAttrs.Parser), 58); + private readonly pbc::MapField argAttr_ = new pbc::MapField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::MapField ArgAttr { + get { return argAttr_; } + } + /// Field number for the "node_def" field. public const int NodeDefFieldNumber = 3; private static readonly pb::FieldCodec _repeated_nodeDef_codec @@ -289,7 +310,7 @@ namespace Tensorflow { /// Field number for the "ret" field. public const int RetFieldNumber = 4; private static readonly pbc::MapField.Codec _map_ret_codec - = new pbc::MapField.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForString(18), 34); + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForString(18, ""), 34); private readonly pbc::MapField ret_ = new pbc::MapField(); /// /// A mapping from the output arg names from `signature` to the @@ -300,6 +321,20 @@ namespace Tensorflow { get { return ret_; } } + /// Field number for the "control_ret" field. + public const int ControlRetFieldNumber = 6; + private static readonly pbc::MapField.Codec _map_controlRet_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForString(18, ""), 50); + private readonly pbc::MapField controlRet_ = new pbc::MapField(); + /// + /// A mapping from control output names from `signature` to node names in + /// `node_def` which should be control outputs of this function. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::MapField ControlRet { + get { return controlRet_; } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as FunctionDef); @@ -315,8 +350,10 @@ namespace Tensorflow { } if (!object.Equals(Signature, other.Signature)) return false; if (!Attr.Equals(other.Attr)) return false; + if (!ArgAttr.Equals(other.ArgAttr)) return false; if(!nodeDef_.Equals(other.nodeDef_)) return false; if (!Ret.Equals(other.Ret)) return false; + if (!ControlRet.Equals(other.ControlRet)) return false; return Equals(_unknownFields, other._unknownFields); } @@ -325,8 +362,10 @@ namespace Tensorflow { int hash = 1; if (signature_ != null) hash ^= Signature.GetHashCode(); hash ^= Attr.GetHashCode(); + hash ^= ArgAttr.GetHashCode(); hash ^= nodeDef_.GetHashCode(); hash ^= Ret.GetHashCode(); + hash ^= ControlRet.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -347,6 +386,8 @@ namespace Tensorflow { nodeDef_.WriteTo(output, _repeated_nodeDef_codec); ret_.WriteTo(output, _map_ret_codec); attr_.WriteTo(output, _map_attr_codec); + controlRet_.WriteTo(output, _map_controlRet_codec); + argAttr_.WriteTo(output, _map_argAttr_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -359,8 +400,10 @@ namespace Tensorflow { size += 1 + pb::CodedOutputStream.ComputeMessageSize(Signature); } size += attr_.CalculateSize(_map_attr_codec); + size += argAttr_.CalculateSize(_map_argAttr_codec); size += nodeDef_.CalculateSize(_repeated_nodeDef_codec); size += ret_.CalculateSize(_map_ret_codec); + size += controlRet_.CalculateSize(_map_controlRet_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -374,13 +417,15 @@ namespace Tensorflow { } if (other.signature_ != null) { if (signature_ == null) { - signature_ = new global::Tensorflow.OpDef(); + Signature = new global::Tensorflow.OpDef(); } Signature.MergeFrom(other.Signature); } attr_.Add(other.attr_); + argAttr_.Add(other.argAttr_); nodeDef_.Add(other.nodeDef_); ret_.Add(other.ret_); + controlRet_.Add(other.controlRet_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -394,9 +439,9 @@ namespace Tensorflow { break; case 10: { if (signature_ == null) { - signature_ = new global::Tensorflow.OpDef(); + Signature = new global::Tensorflow.OpDef(); } - input.ReadMessage(signature_); + input.ReadMessage(Signature); break; } case 26: { @@ -411,9 +456,149 @@ namespace Tensorflow { attr_.AddEntriesFrom(input, _map_attr_codec); break; } + case 50: { + controlRet_.AddEntriesFrom(input, _map_controlRet_codec); + break; + } + case 58: { + argAttr_.AddEntriesFrom(input, _map_argAttr_codec); + break; + } + } + } + } + + #region Nested types + /// Container for nested types declared in the FunctionDef message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static partial class Types { + /// + /// Attributes for function arguments. These attributes are the same set of + /// valid attributes as to _Arg nodes. + /// + public sealed partial class ArgAttrs : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ArgAttrs()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.FunctionDef.Descriptor.NestedTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ArgAttrs() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ArgAttrs(ArgAttrs other) : this() { + attr_ = other.attr_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ArgAttrs Clone() { + return new ArgAttrs(this); + } + + /// Field number for the "attr" field. + public const int AttrFieldNumber = 1; + private static readonly pbc::MapField.Codec _map_attr_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForMessage(18, global::Tensorflow.AttrValue.Parser), 10); + private readonly pbc::MapField attr_ = new pbc::MapField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::MapField Attr { + get { return attr_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as ArgAttrs); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(ArgAttrs other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!Attr.Equals(other.Attr)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + hash ^= Attr.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + attr_.WriteTo(output, _map_attr_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + size += attr_.CalculateSize(_map_attr_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(ArgAttrs other) { + if (other == null) { + return; + } + attr_.Add(other.attr_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + attr_.AddEntriesFrom(input, _map_attr_codec); + break; + } + } + } + } + } + } + #endregion } diff --git a/src/TensorFlowNET.Core/Protobuf/Gen.bat b/src/TensorFlowNET.Core/Protobuf/Gen.bat index 34f16bcf..ad2acc36 100644 --- a/src/TensorFlowNET.Core/Protobuf/Gen.bat +++ b/src/TensorFlowNET.Core/Protobuf/Gen.bat @@ -1,6 +1,6 @@ @ECHO OFF -set SRC_DIR=D:/Projects/tensorflow2.x +set SRC_DIR=D:/SciSharp/tensorflow set DST_DIR=D:/SciSharp/TensorFlow.NET/src/TensorFlowNET.Core/Protobuf protoc -I=%SRC_DIR% --csharp_out=%DST_DIR% tensorflow/core/framework/resource_handle.proto diff --git a/src/TensorFlowNET.Core/Protobuf/Graph.cs b/src/TensorFlowNET.Core/Protobuf/Graph.cs index a55e6d0f..2d5613c8 100644 --- a/src/TensorFlowNET.Core/Protobuf/Graph.cs +++ b/src/TensorFlowNET.Core/Protobuf/Graph.cs @@ -37,8 +37,8 @@ namespace Tensorflow { "b3RvMw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Tensorflow.NodeDefReflection.Descriptor, global::Tensorflow.FunctionReflection.Descriptor, global::Tensorflow.VersionsReflection.Descriptor, }, - new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.GraphDef), global::Tensorflow.GraphDef.Parser, new[]{ "Node", "Versions", "Version", "Library" }, null, null, null) + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.GraphDef), global::Tensorflow.GraphDef.Parser, new[]{ "Node", "Versions", "Version", "Library" }, null, null, null, null) })); } #endregion @@ -253,7 +253,7 @@ namespace Tensorflow { node_.Add(other.node_); if (other.versions_ != null) { if (versions_ == null) { - versions_ = new global::Tensorflow.VersionDef(); + Versions = new global::Tensorflow.VersionDef(); } Versions.MergeFrom(other.Versions); } @@ -262,7 +262,7 @@ namespace Tensorflow { } if (other.library_ != null) { if (library_ == null) { - library_ = new global::Tensorflow.FunctionDefLibrary(); + Library = new global::Tensorflow.FunctionDefLibrary(); } Library.MergeFrom(other.Library); } @@ -283,9 +283,9 @@ namespace Tensorflow { } case 18: { if (library_ == null) { - library_ = new global::Tensorflow.FunctionDefLibrary(); + Library = new global::Tensorflow.FunctionDefLibrary(); } - input.ReadMessage(library_); + input.ReadMessage(Library); break; } case 24: { @@ -294,9 +294,9 @@ namespace Tensorflow { } case 34: { if (versions_ == null) { - versions_ = new global::Tensorflow.VersionDef(); + Versions = new global::Tensorflow.VersionDef(); } - input.ReadMessage(versions_); + input.ReadMessage(Versions); break; } } diff --git a/src/TensorFlowNET.Core/Protobuf/GraphTransferInfo.cs b/src/TensorFlowNET.Core/Protobuf/GraphTransferInfo.cs index 579dae23..da76380e 100644 --- a/src/TensorFlowNET.Core/Protobuf/GraphTransferInfo.cs +++ b/src/TensorFlowNET.Core/Protobuf/GraphTransferInfo.cs @@ -60,15 +60,15 @@ namespace Tensorflow { "Mw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Tensorflow.TypesReflection.Descriptor, }, - new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.GraphTransferNodeInput), global::Tensorflow.GraphTransferNodeInput.Parser, new[]{ "NodeId", "OutputPort" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.GraphTransferNodeInfo), global::Tensorflow.GraphTransferNodeInfo.Parser, new[]{ "Name", "NodeId", "TypeName", "SocOpId", "PaddingId", "InputCount", "OutputCount" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.GraphTransferConstNodeInfo), global::Tensorflow.GraphTransferConstNodeInfo.Parser, new[]{ "Name", "NodeId", "Shape", "Data", "Dtype" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.GraphTransferNodeInputInfo), global::Tensorflow.GraphTransferNodeInputInfo.Parser, new[]{ "NodeId", "NodeInput" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.GraphTransferNodeOutputInfo), global::Tensorflow.GraphTransferNodeOutputInfo.Parser, new[]{ "NodeId", "MaxByteSize" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.GraphTransferGraphInputNodeInfo), global::Tensorflow.GraphTransferGraphInputNodeInfo.Parser, new[]{ "Name", "Shape", "Dtype" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.GraphTransferGraphOutputNodeInfo), global::Tensorflow.GraphTransferGraphOutputNodeInfo.Parser, new[]{ "Name", "Shape", "Dtype" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.GraphTransferInfo), global::Tensorflow.GraphTransferInfo.Parser, new[]{ "NodeInfo", "ConstNodeInfo", "NodeInputInfo", "NodeOutputInfo", "GraphInputNodeInfo", "GraphOutputNodeInfo", "Destination" }, null, new[]{ typeof(global::Tensorflow.GraphTransferInfo.Types.Destination) }, null) + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.GraphTransferNodeInput), global::Tensorflow.GraphTransferNodeInput.Parser, new[]{ "NodeId", "OutputPort" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.GraphTransferNodeInfo), global::Tensorflow.GraphTransferNodeInfo.Parser, new[]{ "Name", "NodeId", "TypeName", "SocOpId", "PaddingId", "InputCount", "OutputCount" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.GraphTransferConstNodeInfo), global::Tensorflow.GraphTransferConstNodeInfo.Parser, new[]{ "Name", "NodeId", "Shape", "Data", "Dtype" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.GraphTransferNodeInputInfo), global::Tensorflow.GraphTransferNodeInputInfo.Parser, new[]{ "NodeId", "NodeInput" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.GraphTransferNodeOutputInfo), global::Tensorflow.GraphTransferNodeOutputInfo.Parser, new[]{ "NodeId", "MaxByteSize" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.GraphTransferGraphInputNodeInfo), global::Tensorflow.GraphTransferGraphInputNodeInfo.Parser, new[]{ "Name", "Shape", "Dtype" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.GraphTransferGraphOutputNodeInfo), global::Tensorflow.GraphTransferGraphOutputNodeInfo.Parser, new[]{ "Name", "Shape", "Dtype" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.GraphTransferInfo), global::Tensorflow.GraphTransferInfo.Parser, new[]{ "NodeInfo", "ConstNodeInfo", "NodeInputInfo", "NodeOutputInfo", "GraphInputNodeInfo", "GraphOutputNodeInfo", "Destination" }, null, new[]{ typeof(global::Tensorflow.GraphTransferInfo.Types.Destination) }, null, null) })); } #endregion @@ -612,7 +612,7 @@ namespace Tensorflow { /// Field number for the "dtype" field. public const int DtypeFieldNumber = 5; - private global::Tensorflow.DataType dtype_ = 0; + private global::Tensorflow.DataType dtype_ = global::Tensorflow.DataType.DtInvalid; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public global::Tensorflow.DataType Dtype { get { return dtype_; } @@ -649,7 +649,7 @@ namespace Tensorflow { if (NodeId != 0) hash ^= NodeId.GetHashCode(); hash ^= shape_.GetHashCode(); if (Data.Length != 0) hash ^= Data.GetHashCode(); - if (Dtype != 0) hash ^= Dtype.GetHashCode(); + if (Dtype != global::Tensorflow.DataType.DtInvalid) hash ^= Dtype.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -676,7 +676,7 @@ namespace Tensorflow { output.WriteRawTag(34); output.WriteBytes(Data); } - if (Dtype != 0) { + if (Dtype != global::Tensorflow.DataType.DtInvalid) { output.WriteRawTag(40); output.WriteEnum((int) Dtype); } @@ -698,7 +698,7 @@ namespace Tensorflow { if (Data.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeBytesSize(Data); } - if (Dtype != 0) { + if (Dtype != global::Tensorflow.DataType.DtInvalid) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Dtype); } if (_unknownFields != null) { @@ -722,7 +722,7 @@ namespace Tensorflow { if (other.Data.Length != 0) { Data = other.Data; } - if (other.Dtype != 0) { + if (other.Dtype != global::Tensorflow.DataType.DtInvalid) { Dtype = other.Dtype; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); @@ -754,7 +754,7 @@ namespace Tensorflow { break; } case 40: { - dtype_ = (global::Tensorflow.DataType) input.ReadEnum(); + Dtype = (global::Tensorflow.DataType) input.ReadEnum(); break; } } @@ -1121,7 +1121,7 @@ namespace Tensorflow { /// Field number for the "dtype" field. public const int DtypeFieldNumber = 3; - private global::Tensorflow.DataType dtype_ = 0; + private global::Tensorflow.DataType dtype_ = global::Tensorflow.DataType.DtInvalid; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public global::Tensorflow.DataType Dtype { get { return dtype_; } @@ -1154,7 +1154,7 @@ namespace Tensorflow { int hash = 1; if (Name.Length != 0) hash ^= Name.GetHashCode(); hash ^= shape_.GetHashCode(); - if (Dtype != 0) hash ^= Dtype.GetHashCode(); + if (Dtype != global::Tensorflow.DataType.DtInvalid) hash ^= Dtype.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -1173,7 +1173,7 @@ namespace Tensorflow { output.WriteString(Name); } shape_.WriteTo(output, _repeated_shape_codec); - if (Dtype != 0) { + if (Dtype != global::Tensorflow.DataType.DtInvalid) { output.WriteRawTag(24); output.WriteEnum((int) Dtype); } @@ -1189,7 +1189,7 @@ namespace Tensorflow { size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); } size += shape_.CalculateSize(_repeated_shape_codec); - if (Dtype != 0) { + if (Dtype != global::Tensorflow.DataType.DtInvalid) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Dtype); } if (_unknownFields != null) { @@ -1207,7 +1207,7 @@ namespace Tensorflow { Name = other.Name; } shape_.Add(other.shape_); - if (other.Dtype != 0) { + if (other.Dtype != global::Tensorflow.DataType.DtInvalid) { Dtype = other.Dtype; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); @@ -1231,7 +1231,7 @@ namespace Tensorflow { break; } case 24: { - dtype_ = (global::Tensorflow.DataType) input.ReadEnum(); + Dtype = (global::Tensorflow.DataType) input.ReadEnum(); break; } } @@ -1299,7 +1299,7 @@ namespace Tensorflow { /// Field number for the "dtype" field. public const int DtypeFieldNumber = 3; - private global::Tensorflow.DataType dtype_ = 0; + private global::Tensorflow.DataType dtype_ = global::Tensorflow.DataType.DtInvalid; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public global::Tensorflow.DataType Dtype { get { return dtype_; } @@ -1332,7 +1332,7 @@ namespace Tensorflow { int hash = 1; if (Name.Length != 0) hash ^= Name.GetHashCode(); hash ^= shape_.GetHashCode(); - if (Dtype != 0) hash ^= Dtype.GetHashCode(); + if (Dtype != global::Tensorflow.DataType.DtInvalid) hash ^= Dtype.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -1351,7 +1351,7 @@ namespace Tensorflow { output.WriteString(Name); } shape_.WriteTo(output, _repeated_shape_codec); - if (Dtype != 0) { + if (Dtype != global::Tensorflow.DataType.DtInvalid) { output.WriteRawTag(24); output.WriteEnum((int) Dtype); } @@ -1367,7 +1367,7 @@ namespace Tensorflow { size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); } size += shape_.CalculateSize(_repeated_shape_codec); - if (Dtype != 0) { + if (Dtype != global::Tensorflow.DataType.DtInvalid) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Dtype); } if (_unknownFields != null) { @@ -1385,7 +1385,7 @@ namespace Tensorflow { Name = other.Name; } shape_.Add(other.shape_); - if (other.Dtype != 0) { + if (other.Dtype != global::Tensorflow.DataType.DtInvalid) { Dtype = other.Dtype; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); @@ -1409,7 +1409,7 @@ namespace Tensorflow { break; } case 24: { - dtype_ = (global::Tensorflow.DataType) input.ReadEnum(); + Dtype = (global::Tensorflow.DataType) input.ReadEnum(); break; } } @@ -1528,7 +1528,7 @@ namespace Tensorflow { /// Field number for the "destination" field. public const int DestinationFieldNumber = 7; - private global::Tensorflow.GraphTransferInfo.Types.Destination destination_ = 0; + private global::Tensorflow.GraphTransferInfo.Types.Destination destination_ = global::Tensorflow.GraphTransferInfo.Types.Destination.Nop; /// /// Destination of graph transfer /// @@ -1572,7 +1572,7 @@ namespace Tensorflow { hash ^= nodeOutputInfo_.GetHashCode(); hash ^= graphInputNodeInfo_.GetHashCode(); hash ^= graphOutputNodeInfo_.GetHashCode(); - if (Destination != 0) hash ^= Destination.GetHashCode(); + if (Destination != global::Tensorflow.GraphTransferInfo.Types.Destination.Nop) hash ^= Destination.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -1592,7 +1592,7 @@ namespace Tensorflow { nodeOutputInfo_.WriteTo(output, _repeated_nodeOutputInfo_codec); graphInputNodeInfo_.WriteTo(output, _repeated_graphInputNodeInfo_codec); graphOutputNodeInfo_.WriteTo(output, _repeated_graphOutputNodeInfo_codec); - if (Destination != 0) { + if (Destination != global::Tensorflow.GraphTransferInfo.Types.Destination.Nop) { output.WriteRawTag(56); output.WriteEnum((int) Destination); } @@ -1610,7 +1610,7 @@ namespace Tensorflow { size += nodeOutputInfo_.CalculateSize(_repeated_nodeOutputInfo_codec); size += graphInputNodeInfo_.CalculateSize(_repeated_graphInputNodeInfo_codec); size += graphOutputNodeInfo_.CalculateSize(_repeated_graphOutputNodeInfo_codec); - if (Destination != 0) { + if (Destination != global::Tensorflow.GraphTransferInfo.Types.Destination.Nop) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Destination); } if (_unknownFields != null) { @@ -1630,7 +1630,7 @@ namespace Tensorflow { nodeOutputInfo_.Add(other.nodeOutputInfo_); graphInputNodeInfo_.Add(other.graphInputNodeInfo_); graphOutputNodeInfo_.Add(other.graphOutputNodeInfo_); - if (other.Destination != 0) { + if (other.Destination != global::Tensorflow.GraphTransferInfo.Types.Destination.Nop) { Destination = other.Destination; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); @@ -1669,7 +1669,7 @@ namespace Tensorflow { break; } case 56: { - destination_ = (global::Tensorflow.GraphTransferInfo.Types.Destination) input.ReadEnum(); + Destination = (global::Tensorflow.GraphTransferInfo.Types.Destination) input.ReadEnum(); break; } } diff --git a/src/TensorFlowNET.Core/Protobuf/KernelDef.cs b/src/TensorFlowNET.Core/Protobuf/KernelDef.cs index b3c3e513..456f76bf 100644 --- a/src/TensorFlowNET.Core/Protobuf/KernelDef.cs +++ b/src/TensorFlowNET.Core/Protobuf/KernelDef.cs @@ -38,9 +38,9 @@ namespace Tensorflow { "L2ZyYW1ld29ya/gBAWIGcHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Tensorflow.AttrValueReflection.Descriptor, }, - new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.KernelDef), global::Tensorflow.KernelDef.Parser, new[]{ "Op", "DeviceType", "Constraint", "HostMemoryArg", "Label", "Priority" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.KernelDef.Types.AttrConstraint), global::Tensorflow.KernelDef.Types.AttrConstraint.Parser, new[]{ "Name", "AllowedValues" }, null, null, null)}), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.KernelList), global::Tensorflow.KernelList.Parser, new[]{ "Kernel" }, null, null, null) + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.KernelDef), global::Tensorflow.KernelDef.Parser, new[]{ "Op", "DeviceType", "Constraint", "HostMemoryArg", "Label", "Priority" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.KernelDef.Types.AttrConstraint), global::Tensorflow.KernelDef.Types.AttrConstraint.Parser, new[]{ "Name", "AllowedValues" }, null, null, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.KernelList), global::Tensorflow.KernelList.Parser, new[]{ "Kernel" }, null, null, null, null) })); } #endregion @@ -460,7 +460,7 @@ namespace Tensorflow { } if (other.allowedValues_ != null) { if (allowedValues_ == null) { - allowedValues_ = new global::Tensorflow.AttrValue(); + AllowedValues = new global::Tensorflow.AttrValue(); } AllowedValues.MergeFrom(other.AllowedValues); } @@ -481,9 +481,9 @@ namespace Tensorflow { } case 18: { if (allowedValues_ == null) { - allowedValues_ = new global::Tensorflow.AttrValue(); + AllowedValues = new global::Tensorflow.AttrValue(); } - input.ReadMessage(allowedValues_); + input.ReadMessage(AllowedValues); break; } } diff --git a/src/TensorFlowNET.Core/Protobuf/LogMemory.cs b/src/TensorFlowNET.Core/Protobuf/LogMemory.cs index e2653bfc..30137bed 100644 --- a/src/TensorFlowNET.Core/Protobuf/LogMemory.cs +++ b/src/TensorFlowNET.Core/Protobuf/LogMemory.cs @@ -46,13 +46,13 @@ namespace Tensorflow { "a/gBAWIGcHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Tensorflow.TensorDescriptionReflection.Descriptor, }, - new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.MemoryLogStep), global::Tensorflow.MemoryLogStep.Parser, new[]{ "StepId", "Handle" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.MemoryLogTensorAllocation), global::Tensorflow.MemoryLogTensorAllocation.Parser, new[]{ "StepId", "KernelName", "Tensor" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.MemoryLogTensorDeallocation), global::Tensorflow.MemoryLogTensorDeallocation.Parser, new[]{ "AllocationId", "AllocatorName" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.MemoryLogTensorOutput), global::Tensorflow.MemoryLogTensorOutput.Parser, new[]{ "StepId", "KernelName", "Index", "Tensor" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.MemoryLogRawAllocation), global::Tensorflow.MemoryLogRawAllocation.Parser, new[]{ "StepId", "Operation", "NumBytes", "Ptr", "AllocationId", "AllocatorName" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.MemoryLogRawDeallocation), global::Tensorflow.MemoryLogRawDeallocation.Parser, new[]{ "StepId", "Operation", "AllocationId", "AllocatorName", "Deferred" }, null, null, null) + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.MemoryLogStep), global::Tensorflow.MemoryLogStep.Parser, new[]{ "StepId", "Handle" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.MemoryLogTensorAllocation), global::Tensorflow.MemoryLogTensorAllocation.Parser, new[]{ "StepId", "KernelName", "Tensor" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.MemoryLogTensorDeallocation), global::Tensorflow.MemoryLogTensorDeallocation.Parser, new[]{ "AllocationId", "AllocatorName" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.MemoryLogTensorOutput), global::Tensorflow.MemoryLogTensorOutput.Parser, new[]{ "StepId", "KernelName", "Index", "Tensor" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.MemoryLogRawAllocation), global::Tensorflow.MemoryLogRawAllocation.Parser, new[]{ "StepId", "Operation", "NumBytes", "Ptr", "AllocationId", "AllocatorName" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.MemoryLogRawDeallocation), global::Tensorflow.MemoryLogRawDeallocation.Parser, new[]{ "StepId", "Operation", "AllocationId", "AllocatorName", "Deferred" }, null, null, null, null) })); } #endregion @@ -387,7 +387,7 @@ namespace Tensorflow { } if (other.tensor_ != null) { if (tensor_ == null) { - tensor_ = new global::Tensorflow.TensorDescription(); + Tensor = new global::Tensorflow.TensorDescription(); } Tensor.MergeFrom(other.Tensor); } @@ -412,9 +412,9 @@ namespace Tensorflow { } case 26: { if (tensor_ == null) { - tensor_ = new global::Tensorflow.TensorDescription(); + Tensor = new global::Tensorflow.TensorDescription(); } - input.ReadMessage(tensor_); + input.ReadMessage(Tensor); break; } } @@ -779,7 +779,7 @@ namespace Tensorflow { } if (other.tensor_ != null) { if (tensor_ == null) { - tensor_ = new global::Tensorflow.TensorDescription(); + Tensor = new global::Tensorflow.TensorDescription(); } Tensor.MergeFrom(other.Tensor); } @@ -808,9 +808,9 @@ namespace Tensorflow { } case 34: { if (tensor_ == null) { - tensor_ = new global::Tensorflow.TensorDescription(); + Tensor = new global::Tensorflow.TensorDescription(); } - input.ReadMessage(tensor_); + input.ReadMessage(Tensor); break; } } diff --git a/src/TensorFlowNET.Core/Protobuf/MetaGraph.cs b/src/TensorFlowNET.Core/Protobuf/MetaGraph.cs index 4e82f863..b5403d2e 100644 --- a/src/TensorFlowNET.Core/Protobuf/MetaGraph.cs +++ b/src/TensorFlowNET.Core/Protobuf/MetaGraph.cs @@ -29,8 +29,10 @@ namespace Tensorflow { "Zmxvdy9jb3JlL2ZyYW1ld29yay9ncmFwaC5wcm90bxomdGVuc29yZmxvdy9j", "b3JlL2ZyYW1ld29yay9vcF9kZWYucHJvdG8aLHRlbnNvcmZsb3cvY29yZS9m", "cmFtZXdvcmsvdGVuc29yX3NoYXBlLnByb3RvGiV0ZW5zb3JmbG93L2NvcmUv", - "ZnJhbWV3b3JrL3R5cGVzLnByb3RvGiR0ZW5zb3JmbG93L2NvcmUvcHJvdG9i", - "dWYvc2F2ZXIucHJvdG8i4wUKDE1ldGFHcmFwaERlZhI7Cg1tZXRhX2luZm9f", + "ZnJhbWV3b3JrL3R5cGVzLnByb3RvGjF0ZW5zb3JmbG93L2NvcmUvcHJvdG9i", + "dWYvc2F2ZWRfb2JqZWN0X2dyYXBoLnByb3RvGiR0ZW5zb3JmbG93L2NvcmUv", + "cHJvdG9idWYvc2F2ZXIucHJvdG8aJXRlbnNvcmZsb3cvY29yZS9wcm90b2J1", + "Zi9zdHJ1Y3QucHJvdG8imwYKDE1ldGFHcmFwaERlZhI7Cg1tZXRhX2luZm9f", "ZGVmGAEgASgLMiQudGVuc29yZmxvdy5NZXRhR3JhcGhEZWYuTWV0YUluZm9E", "ZWYSJwoJZ3JhcGhfZGVmGAIgASgLMhQudGVuc29yZmxvdy5HcmFwaERlZhIn", "CglzYXZlcl9kZWYYAyABKAsyFC50ZW5zb3JmbG93LlNhdmVyRGVmEkMKDmNv", @@ -38,56 +40,63 @@ namespace Tensorflow { "Q29sbGVjdGlvbkRlZkVudHJ5EkEKDXNpZ25hdHVyZV9kZWYYBSADKAsyKi50", "ZW5zb3JmbG93Lk1ldGFHcmFwaERlZi5TaWduYXR1cmVEZWZFbnRyeRIwCg5h", "c3NldF9maWxlX2RlZhgGIAMoCzIYLnRlbnNvcmZsb3cuQXNzZXRGaWxlRGVm", - "GukBCgtNZXRhSW5mb0RlZhIaChJtZXRhX2dyYXBoX3ZlcnNpb24YASABKAkS", - "LAoQc3RyaXBwZWRfb3BfbGlzdBgCIAEoCzISLnRlbnNvcmZsb3cuT3BMaXN0", - "EiYKCGFueV9pbmZvGAMgASgLMhQuZ29vZ2xlLnByb3RvYnVmLkFueRIMCgR0", - "YWdzGAQgAygJEhoKEnRlbnNvcmZsb3dfdmVyc2lvbhgFIAEoCRIeChZ0ZW5z", - "b3JmbG93X2dpdF92ZXJzaW9uGAYgASgJEh4KFnN0cmlwcGVkX2RlZmF1bHRf", - "YXR0cnMYByABKAgaTwoSQ29sbGVjdGlvbkRlZkVudHJ5EgsKA2tleRgBIAEo", - "CRIoCgV2YWx1ZRgCIAEoCzIZLnRlbnNvcmZsb3cuQ29sbGVjdGlvbkRlZjoC", - "OAEaTQoRU2lnbmF0dXJlRGVmRW50cnkSCwoDa2V5GAEgASgJEicKBXZhbHVl", - "GAIgASgLMhgudGVuc29yZmxvdy5TaWduYXR1cmVEZWY6AjgBIt8DCg1Db2xs", - "ZWN0aW9uRGVmEjcKCW5vZGVfbGlzdBgBIAEoCzIiLnRlbnNvcmZsb3cuQ29s", - "bGVjdGlvbkRlZi5Ob2RlTGlzdEgAEjkKCmJ5dGVzX2xpc3QYAiABKAsyIy50", - "ZW5zb3JmbG93LkNvbGxlY3Rpb25EZWYuQnl0ZXNMaXN0SAASOQoKaW50NjRf", - "bGlzdBgDIAEoCzIjLnRlbnNvcmZsb3cuQ29sbGVjdGlvbkRlZi5JbnQ2NExp", - "c3RIABI5CgpmbG9hdF9saXN0GAQgASgLMiMudGVuc29yZmxvdy5Db2xsZWN0", - "aW9uRGVmLkZsb2F0TGlzdEgAEjUKCGFueV9saXN0GAUgASgLMiEudGVuc29y", - "Zmxvdy5Db2xsZWN0aW9uRGVmLkFueUxpc3RIABoZCghOb2RlTGlzdBINCgV2", - "YWx1ZRgBIAMoCRoaCglCeXRlc0xpc3QSDQoFdmFsdWUYASADKAwaHgoJSW50", - "NjRMaXN0EhEKBXZhbHVlGAEgAygDQgIQARoeCglGbG9hdExpc3QSEQoFdmFs", - "dWUYASADKAJCAhABGi4KB0FueUxpc3QSIwoFdmFsdWUYASADKAsyFC5nb29n", - "bGUucHJvdG9idWYuQW55QgYKBGtpbmQioAIKClRlbnNvckluZm8SDgoEbmFt", - "ZRgBIAEoCUgAEjYKCmNvb19zcGFyc2UYBCABKAsyIC50ZW5zb3JmbG93LlRl", - "bnNvckluZm8uQ29vU3BhcnNlSAASIwoFZHR5cGUYAiABKA4yFC50ZW5zb3Jm", - "bG93LkRhdGFUeXBlEjIKDHRlbnNvcl9zaGFwZRgDIAEoCzIcLnRlbnNvcmZs", - "b3cuVGVuc29yU2hhcGVQcm90bxplCglDb29TcGFyc2USGgoSdmFsdWVzX3Rl", - "bnNvcl9uYW1lGAEgASgJEhsKE2luZGljZXNfdGVuc29yX25hbWUYAiABKAkS", - "HwoXZGVuc2Vfc2hhcGVfdGVuc29yX25hbWUYAyABKAlCCgoIZW5jb2Rpbmci", - "oAIKDFNpZ25hdHVyZURlZhI0CgZpbnB1dHMYASADKAsyJC50ZW5zb3JmbG93", - "LlNpZ25hdHVyZURlZi5JbnB1dHNFbnRyeRI2CgdvdXRwdXRzGAIgAygLMiUu", - "dGVuc29yZmxvdy5TaWduYXR1cmVEZWYuT3V0cHV0c0VudHJ5EhMKC21ldGhv", - "ZF9uYW1lGAMgASgJGkUKC0lucHV0c0VudHJ5EgsKA2tleRgBIAEoCRIlCgV2", - "YWx1ZRgCIAEoCzIWLnRlbnNvcmZsb3cuVGVuc29ySW5mbzoCOAEaRgoMT3V0", - "cHV0c0VudHJ5EgsKA2tleRgBIAEoCRIlCgV2YWx1ZRgCIAEoCzIWLnRlbnNv", - "cmZsb3cuVGVuc29ySW5mbzoCOAEiTQoMQXNzZXRGaWxlRGVmEisKC3RlbnNv", - "cl9pbmZvGAEgASgLMhYudGVuc29yZmxvdy5UZW5zb3JJbmZvEhAKCGZpbGVu", - "YW1lGAIgASgJQm4KGG9yZy50ZW5zb3JmbG93LmZyYW1ld29ya0IPTWV0YUdy", - "YXBoUHJvdG9zUAFaPGdpdGh1Yi5jb20vdGVuc29yZmxvdy90ZW5zb3JmbG93", - "L3RlbnNvcmZsb3cvZ28vY29yZS9wcm90b2J1ZvgBAWIGcHJvdG8z")); + "EjYKEG9iamVjdF9ncmFwaF9kZWYYByABKAsyHC50ZW5zb3JmbG93LlNhdmVk", + "T2JqZWN0R3JhcGga6QEKC01ldGFJbmZvRGVmEhoKEm1ldGFfZ3JhcGhfdmVy", + "c2lvbhgBIAEoCRIsChBzdHJpcHBlZF9vcF9saXN0GAIgASgLMhIudGVuc29y", + "Zmxvdy5PcExpc3QSJgoIYW55X2luZm8YAyABKAsyFC5nb29nbGUucHJvdG9i", + "dWYuQW55EgwKBHRhZ3MYBCADKAkSGgoSdGVuc29yZmxvd192ZXJzaW9uGAUg", + "ASgJEh4KFnRlbnNvcmZsb3dfZ2l0X3ZlcnNpb24YBiABKAkSHgoWc3RyaXBw", + "ZWRfZGVmYXVsdF9hdHRycxgHIAEoCBpPChJDb2xsZWN0aW9uRGVmRW50cnkS", + "CwoDa2V5GAEgASgJEigKBXZhbHVlGAIgASgLMhkudGVuc29yZmxvdy5Db2xs", + "ZWN0aW9uRGVmOgI4ARpNChFTaWduYXR1cmVEZWZFbnRyeRILCgNrZXkYASAB", + "KAkSJwoFdmFsdWUYAiABKAsyGC50ZW5zb3JmbG93LlNpZ25hdHVyZURlZjoC", + "OAEi3wMKDUNvbGxlY3Rpb25EZWYSNwoJbm9kZV9saXN0GAEgASgLMiIudGVu", + "c29yZmxvdy5Db2xsZWN0aW9uRGVmLk5vZGVMaXN0SAASOQoKYnl0ZXNfbGlz", + "dBgCIAEoCzIjLnRlbnNvcmZsb3cuQ29sbGVjdGlvbkRlZi5CeXRlc0xpc3RI", + "ABI5CgppbnQ2NF9saXN0GAMgASgLMiMudGVuc29yZmxvdy5Db2xsZWN0aW9u", + "RGVmLkludDY0TGlzdEgAEjkKCmZsb2F0X2xpc3QYBCABKAsyIy50ZW5zb3Jm", + "bG93LkNvbGxlY3Rpb25EZWYuRmxvYXRMaXN0SAASNQoIYW55X2xpc3QYBSAB", + "KAsyIS50ZW5zb3JmbG93LkNvbGxlY3Rpb25EZWYuQW55TGlzdEgAGhkKCE5v", + "ZGVMaXN0Eg0KBXZhbHVlGAEgAygJGhoKCUJ5dGVzTGlzdBINCgV2YWx1ZRgB", + "IAMoDBoeCglJbnQ2NExpc3QSEQoFdmFsdWUYASADKANCAhABGh4KCUZsb2F0", + "TGlzdBIRCgV2YWx1ZRgBIAMoAkICEAEaLgoHQW55TGlzdBIjCgV2YWx1ZRgB", + "IAMoCzIULmdvb2dsZS5wcm90b2J1Zi5BbnlCBgoEa2luZCLRAwoKVGVuc29y", + "SW5mbxIOCgRuYW1lGAEgASgJSAASNgoKY29vX3NwYXJzZRgEIAEoCzIgLnRl", + "bnNvcmZsb3cuVGVuc29ySW5mby5Db29TcGFyc2VIABJCChBjb21wb3NpdGVf", + "dGVuc29yGAUgASgLMiYudGVuc29yZmxvdy5UZW5zb3JJbmZvLkNvbXBvc2l0", + "ZVRlbnNvckgAEiMKBWR0eXBlGAIgASgOMhQudGVuc29yZmxvdy5EYXRhVHlw", + "ZRIyCgx0ZW5zb3Jfc2hhcGUYAyABKAsyHC50ZW5zb3JmbG93LlRlbnNvclNo", + "YXBlUHJvdG8aZQoJQ29vU3BhcnNlEhoKEnZhbHVlc190ZW5zb3JfbmFtZRgB", + "IAEoCRIbChNpbmRpY2VzX3RlbnNvcl9uYW1lGAIgASgJEh8KF2RlbnNlX3No", + "YXBlX3RlbnNvcl9uYW1lGAMgASgJGmsKD0NvbXBvc2l0ZVRlbnNvchIsCgl0", + "eXBlX3NwZWMYASABKAsyGS50ZW5zb3JmbG93LlR5cGVTcGVjUHJvdG8SKgoK", + "Y29tcG9uZW50cxgCIAMoCzIWLnRlbnNvcmZsb3cuVGVuc29ySW5mb0IKCghl", + "bmNvZGluZyKgAgoMU2lnbmF0dXJlRGVmEjQKBmlucHV0cxgBIAMoCzIkLnRl", + "bnNvcmZsb3cuU2lnbmF0dXJlRGVmLklucHV0c0VudHJ5EjYKB291dHB1dHMY", + "AiADKAsyJS50ZW5zb3JmbG93LlNpZ25hdHVyZURlZi5PdXRwdXRzRW50cnkS", + "EwoLbWV0aG9kX25hbWUYAyABKAkaRQoLSW5wdXRzRW50cnkSCwoDa2V5GAEg", + "ASgJEiUKBXZhbHVlGAIgASgLMhYudGVuc29yZmxvdy5UZW5zb3JJbmZvOgI4", + "ARpGCgxPdXRwdXRzRW50cnkSCwoDa2V5GAEgASgJEiUKBXZhbHVlGAIgASgL", + "MhYudGVuc29yZmxvdy5UZW5zb3JJbmZvOgI4ASJNCgxBc3NldEZpbGVEZWYS", + "KwoLdGVuc29yX2luZm8YASABKAsyFi50ZW5zb3JmbG93LlRlbnNvckluZm8S", + "EAoIZmlsZW5hbWUYAiABKAlCbgoYb3JnLnRlbnNvcmZsb3cuZnJhbWV3b3Jr", + "Qg9NZXRhR3JhcGhQcm90b3NQAVo8Z2l0aHViLmNvbS90ZW5zb3JmbG93L3Rl", + "bnNvcmZsb3cvdGVuc29yZmxvdy9nby9jb3JlL3Byb3RvYnVm+AEBYgZwcm90", + "bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, - new pbr::FileDescriptor[] { global::Google.Protobuf.WellKnownTypes.AnyReflection.Descriptor, global::Tensorflow.GraphReflection.Descriptor, global::Tensorflow.OpDefReflection.Descriptor, global::Tensorflow.TensorShapeReflection.Descriptor, global::Tensorflow.TypesReflection.Descriptor, global::Tensorflow.SaverReflection.Descriptor, }, - new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.MetaGraphDef), global::Tensorflow.MetaGraphDef.Parser, new[]{ "MetaInfoDef", "GraphDef", "SaverDef", "CollectionDef", "SignatureDef", "AssetFileDef" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.MetaGraphDef.Types.MetaInfoDef), global::Tensorflow.MetaGraphDef.Types.MetaInfoDef.Parser, new[]{ "MetaGraphVersion", "StrippedOpList", "AnyInfo", "Tags", "TensorflowVersion", "TensorflowGitVersion", "StrippedDefaultAttrs" }, null, null, null), + new pbr::FileDescriptor[] { global::Google.Protobuf.WellKnownTypes.AnyReflection.Descriptor, global::Tensorflow.GraphReflection.Descriptor, global::Tensorflow.OpDefReflection.Descriptor, global::Tensorflow.TensorShapeReflection.Descriptor, global::Tensorflow.TypesReflection.Descriptor, global::Tensorflow.SavedObjectGraphReflection.Descriptor, global::Tensorflow.SaverReflection.Descriptor, global::Tensorflow.StructReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.MetaGraphDef), global::Tensorflow.MetaGraphDef.Parser, new[]{ "MetaInfoDef", "GraphDef", "SaverDef", "CollectionDef", "SignatureDef", "AssetFileDef", "ObjectGraphDef" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.MetaGraphDef.Types.MetaInfoDef), global::Tensorflow.MetaGraphDef.Types.MetaInfoDef.Parser, new[]{ "MetaGraphVersion", "StrippedOpList", "AnyInfo", "Tags", "TensorflowVersion", "TensorflowGitVersion", "StrippedDefaultAttrs" }, null, null, null, null), null, null, }), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.CollectionDef), global::Tensorflow.CollectionDef.Parser, new[]{ "NodeList", "BytesList", "Int64List", "FloatList", "AnyList" }, new[]{ "Kind" }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.CollectionDef.Types.NodeList), global::Tensorflow.CollectionDef.Types.NodeList.Parser, new[]{ "Value" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.CollectionDef.Types.BytesList), global::Tensorflow.CollectionDef.Types.BytesList.Parser, new[]{ "Value" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.CollectionDef.Types.Int64List), global::Tensorflow.CollectionDef.Types.Int64List.Parser, new[]{ "Value" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.CollectionDef.Types.FloatList), global::Tensorflow.CollectionDef.Types.FloatList.Parser, new[]{ "Value" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.CollectionDef.Types.AnyList), global::Tensorflow.CollectionDef.Types.AnyList.Parser, new[]{ "Value" }, null, null, null)}), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.TensorInfo), global::Tensorflow.TensorInfo.Parser, new[]{ "Name", "CooSparse", "Dtype", "TensorShape" }, new[]{ "Encoding" }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.TensorInfo.Types.CooSparse), global::Tensorflow.TensorInfo.Types.CooSparse.Parser, new[]{ "ValuesTensorName", "IndicesTensorName", "DenseShapeTensorName" }, null, null, null)}), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.SignatureDef), global::Tensorflow.SignatureDef.Parser, new[]{ "Inputs", "Outputs", "MethodName" }, null, null, new pbr::GeneratedClrTypeInfo[] { null, null, }), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.AssetFileDef), global::Tensorflow.AssetFileDef.Parser, new[]{ "TensorInfo", "Filename" }, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.CollectionDef), global::Tensorflow.CollectionDef.Parser, new[]{ "NodeList", "BytesList", "Int64List", "FloatList", "AnyList" }, new[]{ "Kind" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.CollectionDef.Types.NodeList), global::Tensorflow.CollectionDef.Types.NodeList.Parser, new[]{ "Value" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.CollectionDef.Types.BytesList), global::Tensorflow.CollectionDef.Types.BytesList.Parser, new[]{ "Value" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.CollectionDef.Types.Int64List), global::Tensorflow.CollectionDef.Types.Int64List.Parser, new[]{ "Value" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.CollectionDef.Types.FloatList), global::Tensorflow.CollectionDef.Types.FloatList.Parser, new[]{ "Value" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.CollectionDef.Types.AnyList), global::Tensorflow.CollectionDef.Types.AnyList.Parser, new[]{ "Value" }, null, null, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.TensorInfo), global::Tensorflow.TensorInfo.Parser, new[]{ "Name", "CooSparse", "CompositeTensor", "Dtype", "TensorShape" }, new[]{ "Encoding" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.TensorInfo.Types.CooSparse), global::Tensorflow.TensorInfo.Types.CooSparse.Parser, new[]{ "ValuesTensorName", "IndicesTensorName", "DenseShapeTensorName" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.TensorInfo.Types.CompositeTensor), global::Tensorflow.TensorInfo.Types.CompositeTensor.Parser, new[]{ "TypeSpec", "Components" }, null, null, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.SignatureDef), global::Tensorflow.SignatureDef.Parser, new[]{ "Inputs", "Outputs", "MethodName" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, null, }), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.AssetFileDef), global::Tensorflow.AssetFileDef.Parser, new[]{ "TensorInfo", "Filename" }, null, null, null, null) })); } #endregion @@ -141,6 +150,7 @@ namespace Tensorflow { collectionDef_ = other.collectionDef_.Clone(); signatureDef_ = other.signatureDef_.Clone(); assetFileDef_ = other.assetFileDef_.Clone(); + objectGraphDef_ = other.objectGraphDef_ != null ? other.objectGraphDef_.Clone() : null; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -191,7 +201,7 @@ namespace Tensorflow { /// Field number for the "collection_def" field. public const int CollectionDefFieldNumber = 4; private static readonly pbc::MapField.Codec _map_collectionDef_codec - = new pbc::MapField.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForMessage(18, global::Tensorflow.CollectionDef.Parser), 34); + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForMessage(18, global::Tensorflow.CollectionDef.Parser), 34); private readonly pbc::MapField collectionDef_ = new pbc::MapField(); /// /// collection_def: Map from collection name to collections. @@ -205,7 +215,7 @@ namespace Tensorflow { /// Field number for the "signature_def" field. public const int SignatureDefFieldNumber = 5; private static readonly pbc::MapField.Codec _map_signatureDef_codec - = new pbc::MapField.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForMessage(18, global::Tensorflow.SignatureDef.Parser), 42); + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForMessage(18, global::Tensorflow.SignatureDef.Parser), 42); private readonly pbc::MapField signatureDef_ = new pbc::MapField(); /// /// signature_def: Map from user supplied key for a signature to a single @@ -229,6 +239,20 @@ namespace Tensorflow { get { return assetFileDef_; } } + /// Field number for the "object_graph_def" field. + public const int ObjectGraphDefFieldNumber = 7; + private global::Tensorflow.SavedObjectGraph objectGraphDef_; + /// + /// Extra information about the structure of functions and stateful objects. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.SavedObjectGraph ObjectGraphDef { + get { return objectGraphDef_; } + set { + objectGraphDef_ = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as MetaGraphDef); @@ -248,6 +272,7 @@ namespace Tensorflow { if (!CollectionDef.Equals(other.CollectionDef)) return false; if (!SignatureDef.Equals(other.SignatureDef)) return false; if(!assetFileDef_.Equals(other.assetFileDef_)) return false; + if (!object.Equals(ObjectGraphDef, other.ObjectGraphDef)) return false; return Equals(_unknownFields, other._unknownFields); } @@ -260,6 +285,7 @@ namespace Tensorflow { hash ^= CollectionDef.GetHashCode(); hash ^= SignatureDef.GetHashCode(); hash ^= assetFileDef_.GetHashCode(); + if (objectGraphDef_ != null) hash ^= ObjectGraphDef.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -288,6 +314,10 @@ namespace Tensorflow { collectionDef_.WriteTo(output, _map_collectionDef_codec); signatureDef_.WriteTo(output, _map_signatureDef_codec); assetFileDef_.WriteTo(output, _repeated_assetFileDef_codec); + if (objectGraphDef_ != null) { + output.WriteRawTag(58); + output.WriteMessage(ObjectGraphDef); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -308,6 +338,9 @@ namespace Tensorflow { size += collectionDef_.CalculateSize(_map_collectionDef_codec); size += signatureDef_.CalculateSize(_map_signatureDef_codec); size += assetFileDef_.CalculateSize(_repeated_assetFileDef_codec); + if (objectGraphDef_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ObjectGraphDef); + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -321,25 +354,31 @@ namespace Tensorflow { } if (other.metaInfoDef_ != null) { if (metaInfoDef_ == null) { - metaInfoDef_ = new global::Tensorflow.MetaGraphDef.Types.MetaInfoDef(); + MetaInfoDef = new global::Tensorflow.MetaGraphDef.Types.MetaInfoDef(); } MetaInfoDef.MergeFrom(other.MetaInfoDef); } if (other.graphDef_ != null) { if (graphDef_ == null) { - graphDef_ = new global::Tensorflow.GraphDef(); + GraphDef = new global::Tensorflow.GraphDef(); } GraphDef.MergeFrom(other.GraphDef); } if (other.saverDef_ != null) { if (saverDef_ == null) { - saverDef_ = new global::Tensorflow.SaverDef(); + SaverDef = new global::Tensorflow.SaverDef(); } SaverDef.MergeFrom(other.SaverDef); } collectionDef_.Add(other.collectionDef_); signatureDef_.Add(other.signatureDef_); assetFileDef_.Add(other.assetFileDef_); + if (other.objectGraphDef_ != null) { + if (objectGraphDef_ == null) { + ObjectGraphDef = new global::Tensorflow.SavedObjectGraph(); + } + ObjectGraphDef.MergeFrom(other.ObjectGraphDef); + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -353,23 +392,23 @@ namespace Tensorflow { break; case 10: { if (metaInfoDef_ == null) { - metaInfoDef_ = new global::Tensorflow.MetaGraphDef.Types.MetaInfoDef(); + MetaInfoDef = new global::Tensorflow.MetaGraphDef.Types.MetaInfoDef(); } - input.ReadMessage(metaInfoDef_); + input.ReadMessage(MetaInfoDef); break; } case 18: { if (graphDef_ == null) { - graphDef_ = new global::Tensorflow.GraphDef(); + GraphDef = new global::Tensorflow.GraphDef(); } - input.ReadMessage(graphDef_); + input.ReadMessage(GraphDef); break; } case 26: { if (saverDef_ == null) { - saverDef_ = new global::Tensorflow.SaverDef(); + SaverDef = new global::Tensorflow.SaverDef(); } - input.ReadMessage(saverDef_); + input.ReadMessage(SaverDef); break; } case 34: { @@ -384,6 +423,13 @@ namespace Tensorflow { assetFileDef_.AddEntriesFrom(input, _repeated_assetFileDef_codec); break; } + case 58: { + if (objectGraphDef_ == null) { + ObjectGraphDef = new global::Tensorflow.SavedObjectGraph(); + } + input.ReadMessage(ObjectGraphDef); + break; + } } } } @@ -660,13 +706,13 @@ namespace Tensorflow { } if (other.strippedOpList_ != null) { if (strippedOpList_ == null) { - strippedOpList_ = new global::Tensorflow.OpList(); + StrippedOpList = new global::Tensorflow.OpList(); } StrippedOpList.MergeFrom(other.StrippedOpList); } if (other.anyInfo_ != null) { if (anyInfo_ == null) { - anyInfo_ = new global::Google.Protobuf.WellKnownTypes.Any(); + AnyInfo = new global::Google.Protobuf.WellKnownTypes.Any(); } AnyInfo.MergeFrom(other.AnyInfo); } @@ -697,16 +743,16 @@ namespace Tensorflow { } case 18: { if (strippedOpList_ == null) { - strippedOpList_ = new global::Tensorflow.OpList(); + StrippedOpList = new global::Tensorflow.OpList(); } - input.ReadMessage(strippedOpList_); + input.ReadMessage(StrippedOpList); break; } case 26: { if (anyInfo_ == null) { - anyInfo_ = new global::Google.Protobuf.WellKnownTypes.Any(); + AnyInfo = new global::Google.Protobuf.WellKnownTypes.Any(); } - input.ReadMessage(anyInfo_); + input.ReadMessage(AnyInfo); break; } case 34: { @@ -1808,6 +1854,9 @@ namespace Tensorflow { case EncodingOneofCase.CooSparse: CooSparse = other.CooSparse.Clone(); break; + case EncodingOneofCase.CompositeTensor: + CompositeTensor = other.CompositeTensor.Clone(); + break; } _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); @@ -1849,9 +1898,23 @@ namespace Tensorflow { } } + /// Field number for the "composite_tensor" field. + public const int CompositeTensorFieldNumber = 5; + /// + /// Generic encoding for CompositeTensors. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.TensorInfo.Types.CompositeTensor CompositeTensor { + get { return encodingCase_ == EncodingOneofCase.CompositeTensor ? (global::Tensorflow.TensorInfo.Types.CompositeTensor) encoding_ : null; } + set { + encoding_ = value; + encodingCase_ = value == null ? EncodingOneofCase.None : EncodingOneofCase.CompositeTensor; + } + } + /// Field number for the "dtype" field. public const int DtypeFieldNumber = 2; - private global::Tensorflow.DataType dtype_ = 0; + private global::Tensorflow.DataType dtype_ = global::Tensorflow.DataType.DtInvalid; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public global::Tensorflow.DataType Dtype { get { return dtype_; } @@ -1882,6 +1945,7 @@ namespace Tensorflow { None = 0, Name = 1, CooSparse = 4, + CompositeTensor = 5, } private EncodingOneofCase encodingCase_ = EncodingOneofCase.None; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1910,6 +1974,7 @@ namespace Tensorflow { } if (Name != other.Name) return false; if (!object.Equals(CooSparse, other.CooSparse)) return false; + if (!object.Equals(CompositeTensor, other.CompositeTensor)) return false; if (Dtype != other.Dtype) return false; if (!object.Equals(TensorShape, other.TensorShape)) return false; if (EncodingCase != other.EncodingCase) return false; @@ -1921,7 +1986,8 @@ namespace Tensorflow { int hash = 1; if (encodingCase_ == EncodingOneofCase.Name) hash ^= Name.GetHashCode(); if (encodingCase_ == EncodingOneofCase.CooSparse) hash ^= CooSparse.GetHashCode(); - if (Dtype != 0) hash ^= Dtype.GetHashCode(); + if (encodingCase_ == EncodingOneofCase.CompositeTensor) hash ^= CompositeTensor.GetHashCode(); + if (Dtype != global::Tensorflow.DataType.DtInvalid) hash ^= Dtype.GetHashCode(); if (tensorShape_ != null) hash ^= TensorShape.GetHashCode(); hash ^= (int) encodingCase_; if (_unknownFields != null) { @@ -1941,7 +2007,7 @@ namespace Tensorflow { output.WriteRawTag(10); output.WriteString(Name); } - if (Dtype != 0) { + if (Dtype != global::Tensorflow.DataType.DtInvalid) { output.WriteRawTag(16); output.WriteEnum((int) Dtype); } @@ -1953,6 +2019,10 @@ namespace Tensorflow { output.WriteRawTag(34); output.WriteMessage(CooSparse); } + if (encodingCase_ == EncodingOneofCase.CompositeTensor) { + output.WriteRawTag(42); + output.WriteMessage(CompositeTensor); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -1967,7 +2037,10 @@ namespace Tensorflow { if (encodingCase_ == EncodingOneofCase.CooSparse) { size += 1 + pb::CodedOutputStream.ComputeMessageSize(CooSparse); } - if (Dtype != 0) { + if (encodingCase_ == EncodingOneofCase.CompositeTensor) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(CompositeTensor); + } + if (Dtype != global::Tensorflow.DataType.DtInvalid) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Dtype); } if (tensorShape_ != null) { @@ -1984,12 +2057,12 @@ namespace Tensorflow { if (other == null) { return; } - if (other.Dtype != 0) { + if (other.Dtype != global::Tensorflow.DataType.DtInvalid) { Dtype = other.Dtype; } if (other.tensorShape_ != null) { if (tensorShape_ == null) { - tensorShape_ = new global::Tensorflow.TensorShapeProto(); + TensorShape = new global::Tensorflow.TensorShapeProto(); } TensorShape.MergeFrom(other.TensorShape); } @@ -2003,6 +2076,12 @@ namespace Tensorflow { } CooSparse.MergeFrom(other.CooSparse); break; + case EncodingOneofCase.CompositeTensor: + if (CompositeTensor == null) { + CompositeTensor = new global::Tensorflow.TensorInfo.Types.CompositeTensor(); + } + CompositeTensor.MergeFrom(other.CompositeTensor); + break; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); @@ -2021,14 +2100,14 @@ namespace Tensorflow { break; } case 16: { - dtype_ = (global::Tensorflow.DataType) input.ReadEnum(); + Dtype = (global::Tensorflow.DataType) input.ReadEnum(); break; } case 26: { if (tensorShape_ == null) { - tensorShape_ = new global::Tensorflow.TensorShapeProto(); + TensorShape = new global::Tensorflow.TensorShapeProto(); } - input.ReadMessage(tensorShape_); + input.ReadMessage(TensorShape); break; } case 34: { @@ -2040,6 +2119,15 @@ namespace Tensorflow { CooSparse = subBuilder; break; } + case 42: { + global::Tensorflow.TensorInfo.Types.CompositeTensor subBuilder = new global::Tensorflow.TensorInfo.Types.CompositeTensor(); + if (encodingCase_ == EncodingOneofCase.CompositeTensor) { + subBuilder.MergeFrom(CompositeTensor); + } + input.ReadMessage(subBuilder); + CompositeTensor = subBuilder; + break; + } } } } @@ -2248,6 +2336,170 @@ namespace Tensorflow { } + /// + /// Generic encoding for composite tensors. + /// + public sealed partial class CompositeTensor : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CompositeTensor()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.TensorInfo.Descriptor.NestedTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public CompositeTensor() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public CompositeTensor(CompositeTensor other) : this() { + typeSpec_ = other.typeSpec_ != null ? other.typeSpec_.Clone() : null; + components_ = other.components_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public CompositeTensor Clone() { + return new CompositeTensor(this); + } + + /// Field number for the "type_spec" field. + public const int TypeSpecFieldNumber = 1; + private global::Tensorflow.TypeSpecProto typeSpec_; + /// + /// The serialized TypeSpec for the composite tensor. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.TypeSpecProto TypeSpec { + get { return typeSpec_; } + set { + typeSpec_ = value; + } + } + + /// Field number for the "components" field. + public const int ComponentsFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_components_codec + = pb::FieldCodec.ForMessage(18, global::Tensorflow.TensorInfo.Parser); + private readonly pbc::RepeatedField components_ = new pbc::RepeatedField(); + /// + /// A TensorInfo for each flattened component tensor. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField Components { + get { return components_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as CompositeTensor); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(CompositeTensor other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(TypeSpec, other.TypeSpec)) return false; + if(!components_.Equals(other.components_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (typeSpec_ != null) hash ^= TypeSpec.GetHashCode(); + hash ^= components_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (typeSpec_ != null) { + output.WriteRawTag(10); + output.WriteMessage(TypeSpec); + } + components_.WriteTo(output, _repeated_components_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (typeSpec_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(TypeSpec); + } + size += components_.CalculateSize(_repeated_components_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(CompositeTensor other) { + if (other == null) { + return; + } + if (other.typeSpec_ != null) { + if (typeSpec_ == null) { + TypeSpec = new global::Tensorflow.TypeSpecProto(); + } + TypeSpec.MergeFrom(other.TypeSpec); + } + components_.Add(other.components_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (typeSpec_ == null) { + TypeSpec = new global::Tensorflow.TypeSpecProto(); + } + input.ReadMessage(TypeSpec); + break; + } + case 18: { + components_.AddEntriesFrom(input, _repeated_components_codec); + break; + } + } + } + } + + } + } #endregion @@ -2351,7 +2603,7 @@ namespace Tensorflow { /// Field number for the "inputs" field. public const int InputsFieldNumber = 1; private static readonly pbc::MapField.Codec _map_inputs_codec - = new pbc::MapField.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForMessage(18, global::Tensorflow.TensorInfo.Parser), 10); + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForMessage(18, global::Tensorflow.TensorInfo.Parser), 10); private readonly pbc::MapField inputs_ = new pbc::MapField(); /// /// Named input parameters. @@ -2364,7 +2616,7 @@ namespace Tensorflow { /// Field number for the "outputs" field. public const int OutputsFieldNumber = 2; private static readonly pbc::MapField.Codec _map_outputs_codec - = new pbc::MapField.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForMessage(18, global::Tensorflow.TensorInfo.Parser), 18); + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForMessage(18, global::Tensorflow.TensorInfo.Parser), 18); private readonly pbc::MapField outputs_ = new pbc::MapField(); /// /// Named output parameters. @@ -2637,7 +2889,7 @@ namespace Tensorflow { } if (other.tensorInfo_ != null) { if (tensorInfo_ == null) { - tensorInfo_ = new global::Tensorflow.TensorInfo(); + TensorInfo = new global::Tensorflow.TensorInfo(); } TensorInfo.MergeFrom(other.TensorInfo); } @@ -2657,9 +2909,9 @@ namespace Tensorflow { break; case 10: { if (tensorInfo_ == null) { - tensorInfo_ = new global::Tensorflow.TensorInfo(); + TensorInfo = new global::Tensorflow.TensorInfo(); } - input.ReadMessage(tensorInfo_); + input.ReadMessage(TensorInfo); break; } case 18: { diff --git a/src/TensorFlowNET.Core/Protobuf/NodeDef.cs b/src/TensorFlowNET.Core/Protobuf/NodeDef.cs index 044d85ac..b0fcbfe8 100644 --- a/src/TensorFlowNET.Core/Protobuf/NodeDef.cs +++ b/src/TensorFlowNET.Core/Protobuf/NodeDef.cs @@ -26,20 +26,21 @@ namespace Tensorflow { string.Concat( "Cih0ZW5zb3JmbG93L2NvcmUvZnJhbWV3b3JrL25vZGVfZGVmLnByb3RvEgp0", "ZW5zb3JmbG93Gip0ZW5zb3JmbG93L2NvcmUvZnJhbWV3b3JrL2F0dHJfdmFs", - "dWUucHJvdG8itQIKB05vZGVEZWYSDAoEbmFtZRgBIAEoCRIKCgJvcBgCIAEo", + "dWUucHJvdG8i0gIKB05vZGVEZWYSDAoEbmFtZRgBIAEoCRIKCgJvcBgCIAEo", "CRINCgVpbnB1dBgDIAMoCRIOCgZkZXZpY2UYBCABKAkSKwoEYXR0chgFIAMo", "CzIdLnRlbnNvcmZsb3cuTm9kZURlZi5BdHRyRW50cnkSSgoXZXhwZXJpbWVu", "dGFsX2RlYnVnX2luZm8YBiABKAsyKS50ZW5zb3JmbG93Lk5vZGVEZWYuRXhw", "ZXJpbWVudGFsRGVidWdJbmZvGkIKCUF0dHJFbnRyeRILCgNrZXkYASABKAkS", - "JAoFdmFsdWUYAiABKAsyFS50ZW5zb3JmbG93LkF0dHJWYWx1ZToCOAEaNAoV", + "JAoFdmFsdWUYAiABKAsyFS50ZW5zb3JmbG93LkF0dHJWYWx1ZToCOAEaUQoV", "RXhwZXJpbWVudGFsRGVidWdJbmZvEhsKE29yaWdpbmFsX25vZGVfbmFtZXMY", - "ASADKAlCaQoYb3JnLnRlbnNvcmZsb3cuZnJhbWV3b3JrQglOb2RlUHJvdG9Q", - "AVo9Z2l0aHViLmNvbS90ZW5zb3JmbG93L3RlbnNvcmZsb3cvdGVuc29yZmxv", - "dy9nby9jb3JlL2ZyYW1ld29ya/gBAWIGcHJvdG8z")); + "ASADKAkSGwoTb3JpZ2luYWxfZnVuY19uYW1lcxgCIAMoCUJpChhvcmcudGVu", + "c29yZmxvdy5mcmFtZXdvcmtCCU5vZGVQcm90b1ABWj1naXRodWIuY29tL3Rl", + "bnNvcmZsb3cvdGVuc29yZmxvdy90ZW5zb3JmbG93L2dvL2NvcmUvZnJhbWV3", + "b3Jr+AEBYgZwcm90bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Tensorflow.AttrValueReflection.Descriptor, }, - new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.NodeDef), global::Tensorflow.NodeDef.Parser, new[]{ "Name", "Op", "Input", "Device", "Attr", "ExperimentalDebugInfo" }, null, null, new pbr::GeneratedClrTypeInfo[] { null, new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.NodeDef.Types.ExperimentalDebugInfo), global::Tensorflow.NodeDef.Types.ExperimentalDebugInfo.Parser, new[]{ "OriginalNodeNames" }, null, null, null)}) + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.NodeDef), global::Tensorflow.NodeDef.Parser, new[]{ "Name", "Op", "Input", "Device", "Attr", "ExperimentalDebugInfo" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.NodeDef.Types.ExperimentalDebugInfo), global::Tensorflow.NodeDef.Types.ExperimentalDebugInfo.Parser, new[]{ "OriginalNodeNames", "OriginalFuncNames" }, null, null, null, null)}) })); } #endregion @@ -91,7 +92,7 @@ namespace Tensorflow { /// /// The name given to this operator. Used for naming inputs, /// logging, visualization, etc. Unique within a single GraphDef. - /// Must match the regexp "[A-Za-z0-9.][A-Za-z0-9_./]*". + /// Must match the regexp "[A-Za-z0-9.][A-Za-z0-9_>./]*". /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public string Name { @@ -169,7 +170,7 @@ namespace Tensorflow { /// Field number for the "attr" field. public const int AttrFieldNumber = 5; private static readonly pbc::MapField.Codec _map_attr_codec - = new pbc::MapField.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForMessage(18, global::Tensorflow.AttrValue.Parser), 42); + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForMessage(18, global::Tensorflow.AttrValue.Parser), 42); private readonly pbc::MapField attr_ = new pbc::MapField(); /// /// Operation-specific graph-construction-time configuration. @@ -312,7 +313,7 @@ namespace Tensorflow { attr_.Add(other.attr_); if (other.experimentalDebugInfo_ != null) { if (experimentalDebugInfo_ == null) { - experimentalDebugInfo_ = new global::Tensorflow.NodeDef.Types.ExperimentalDebugInfo(); + ExperimentalDebugInfo = new global::Tensorflow.NodeDef.Types.ExperimentalDebugInfo(); } ExperimentalDebugInfo.MergeFrom(other.ExperimentalDebugInfo); } @@ -349,9 +350,9 @@ namespace Tensorflow { } case 50: { if (experimentalDebugInfo_ == null) { - experimentalDebugInfo_ = new global::Tensorflow.NodeDef.Types.ExperimentalDebugInfo(); + ExperimentalDebugInfo = new global::Tensorflow.NodeDef.Types.ExperimentalDebugInfo(); } - input.ReadMessage(experimentalDebugInfo_); + input.ReadMessage(ExperimentalDebugInfo); break; } } @@ -388,6 +389,7 @@ namespace Tensorflow { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public ExperimentalDebugInfo(ExperimentalDebugInfo other) : this() { originalNodeNames_ = other.originalNodeNames_.Clone(); + originalFuncNames_ = other.originalFuncNames_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -415,6 +417,25 @@ namespace Tensorflow { get { return originalNodeNames_; } } + /// Field number for the "original_func_names" field. + public const int OriginalFuncNamesFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_originalFuncNames_codec + = pb::FieldCodec.ForString(18); + private readonly pbc::RepeatedField originalFuncNames_ = new pbc::RepeatedField(); + /// + /// This is intended to store the list of names of the functions from the + /// original graph that this node was derived. For example if this node, say + /// C, was result of a fusion of node A in function FA and node B in function + /// FB, then `original_funcs` would be {FA, FB}. If the node is in the top + /// level graph, the `original_func` is empty. This information, with the + /// `original_node_names` can be used to map errors originating at the + /// current ndoe to some top level source code. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField OriginalFuncNames { + get { return originalFuncNames_; } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as ExperimentalDebugInfo); @@ -429,6 +450,7 @@ namespace Tensorflow { return true; } if(!originalNodeNames_.Equals(other.originalNodeNames_)) return false; + if(!originalFuncNames_.Equals(other.originalFuncNames_)) return false; return Equals(_unknownFields, other._unknownFields); } @@ -436,6 +458,7 @@ namespace Tensorflow { public override int GetHashCode() { int hash = 1; hash ^= originalNodeNames_.GetHashCode(); + hash ^= originalFuncNames_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -450,6 +473,7 @@ namespace Tensorflow { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void WriteTo(pb::CodedOutputStream output) { originalNodeNames_.WriteTo(output, _repeated_originalNodeNames_codec); + originalFuncNames_.WriteTo(output, _repeated_originalFuncNames_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -459,6 +483,7 @@ namespace Tensorflow { public int CalculateSize() { int size = 0; size += originalNodeNames_.CalculateSize(_repeated_originalNodeNames_codec); + size += originalFuncNames_.CalculateSize(_repeated_originalFuncNames_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -471,6 +496,7 @@ namespace Tensorflow { return; } originalNodeNames_.Add(other.originalNodeNames_); + originalFuncNames_.Add(other.originalFuncNames_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -486,6 +512,10 @@ namespace Tensorflow { originalNodeNames_.AddEntriesFrom(input, _repeated_originalNodeNames_codec); break; } + case 18: { + originalFuncNames_.AddEntriesFrom(input, _repeated_originalFuncNames_codec); + break; + } } } } diff --git a/src/TensorFlowNET.Core/Protobuf/OpDef.cs b/src/TensorFlowNET.Core/Protobuf/OpDef.cs index eb5c933f..2bb6c3e3 100644 --- a/src/TensorFlowNET.Core/Protobuf/OpDef.cs +++ b/src/TensorFlowNET.Core/Protobuf/OpDef.cs @@ -27,34 +27,34 @@ namespace Tensorflow { "CiZ0ZW5zb3JmbG93L2NvcmUvZnJhbWV3b3JrL29wX2RlZi5wcm90bxIKdGVu", "c29yZmxvdxoqdGVuc29yZmxvdy9jb3JlL2ZyYW1ld29yay9hdHRyX3ZhbHVl", "LnByb3RvGiV0ZW5zb3JmbG93L2NvcmUvZnJhbWV3b3JrL3R5cGVzLnByb3Rv", - "IrgFCgVPcERlZhIMCgRuYW1lGAEgASgJEisKCWlucHV0X2FyZxgCIAMoCzIY", + "ItAFCgVPcERlZhIMCgRuYW1lGAEgASgJEisKCWlucHV0X2FyZxgCIAMoCzIY", "LnRlbnNvcmZsb3cuT3BEZWYuQXJnRGVmEiwKCm91dHB1dF9hcmcYAyADKAsy", - "GC50ZW5zb3JmbG93Lk9wRGVmLkFyZ0RlZhInCgRhdHRyGAQgAygLMhkudGVu", - "c29yZmxvdy5PcERlZi5BdHRyRGVmEi4KC2RlcHJlY2F0aW9uGAggASgLMhku", - "dGVuc29yZmxvdy5PcERlcHJlY2F0aW9uEg8KB3N1bW1hcnkYBSABKAkSEwoL", - "ZGVzY3JpcHRpb24YBiABKAkSFgoOaXNfY29tbXV0YXRpdmUYEiABKAgSFAoM", - "aXNfYWdncmVnYXRlGBAgASgIEhMKC2lzX3N0YXRlZnVsGBEgASgIEiIKGmFs", - "bG93c191bmluaXRpYWxpemVkX2lucHV0GBMgASgIGp8BCgZBcmdEZWYSDAoE", - "bmFtZRgBIAEoCRITCgtkZXNjcmlwdGlvbhgCIAEoCRIiCgR0eXBlGAMgASgO", - "MhQudGVuc29yZmxvdy5EYXRhVHlwZRIRCgl0eXBlX2F0dHIYBCABKAkSEwoL", - "bnVtYmVyX2F0dHIYBSABKAkSFgoOdHlwZV9saXN0X2F0dHIYBiABKAkSDgoG", - "aXNfcmVmGBAgASgIGr0BCgdBdHRyRGVmEgwKBG5hbWUYASABKAkSDAoEdHlw", - "ZRgCIAEoCRIsCg1kZWZhdWx0X3ZhbHVlGAMgASgLMhUudGVuc29yZmxvdy5B", - "dHRyVmFsdWUSEwoLZGVzY3JpcHRpb24YBCABKAkSEwoLaGFzX21pbmltdW0Y", - "BSABKAgSDwoHbWluaW11bRgGIAEoAxItCg5hbGxvd2VkX3ZhbHVlcxgHIAEo", - "CzIVLnRlbnNvcmZsb3cuQXR0clZhbHVlIjUKDU9wRGVwcmVjYXRpb24SDwoH", - "dmVyc2lvbhgBIAEoBRITCgtleHBsYW5hdGlvbhgCIAEoCSInCgZPcExpc3QS", - "HQoCb3AYASADKAsyES50ZW5zb3JmbG93Lk9wRGVmQmsKGG9yZy50ZW5zb3Jm", - "bG93LmZyYW1ld29ya0ILT3BEZWZQcm90b3NQAVo9Z2l0aHViLmNvbS90ZW5z", - "b3JmbG93L3RlbnNvcmZsb3cvdGVuc29yZmxvdy9nby9jb3JlL2ZyYW1ld29y", - "a/gBAWIGcHJvdG8z")); + "GC50ZW5zb3JmbG93Lk9wRGVmLkFyZ0RlZhIWCg5jb250cm9sX291dHB1dBgU", + "IAMoCRInCgRhdHRyGAQgAygLMhkudGVuc29yZmxvdy5PcERlZi5BdHRyRGVm", + "Ei4KC2RlcHJlY2F0aW9uGAggASgLMhkudGVuc29yZmxvdy5PcERlcHJlY2F0", + "aW9uEg8KB3N1bW1hcnkYBSABKAkSEwoLZGVzY3JpcHRpb24YBiABKAkSFgoO", + "aXNfY29tbXV0YXRpdmUYEiABKAgSFAoMaXNfYWdncmVnYXRlGBAgASgIEhMK", + "C2lzX3N0YXRlZnVsGBEgASgIEiIKGmFsbG93c191bmluaXRpYWxpemVkX2lu", + "cHV0GBMgASgIGp8BCgZBcmdEZWYSDAoEbmFtZRgBIAEoCRITCgtkZXNjcmlw", + "dGlvbhgCIAEoCRIiCgR0eXBlGAMgASgOMhQudGVuc29yZmxvdy5EYXRhVHlw", + "ZRIRCgl0eXBlX2F0dHIYBCABKAkSEwoLbnVtYmVyX2F0dHIYBSABKAkSFgoO", + "dHlwZV9saXN0X2F0dHIYBiABKAkSDgoGaXNfcmVmGBAgASgIGr0BCgdBdHRy", + "RGVmEgwKBG5hbWUYASABKAkSDAoEdHlwZRgCIAEoCRIsCg1kZWZhdWx0X3Zh", + "bHVlGAMgASgLMhUudGVuc29yZmxvdy5BdHRyVmFsdWUSEwoLZGVzY3JpcHRp", + "b24YBCABKAkSEwoLaGFzX21pbmltdW0YBSABKAgSDwoHbWluaW11bRgGIAEo", + "AxItCg5hbGxvd2VkX3ZhbHVlcxgHIAEoCzIVLnRlbnNvcmZsb3cuQXR0clZh", + "bHVlIjUKDU9wRGVwcmVjYXRpb24SDwoHdmVyc2lvbhgBIAEoBRITCgtleHBs", + "YW5hdGlvbhgCIAEoCSInCgZPcExpc3QSHQoCb3AYASADKAsyES50ZW5zb3Jm", + "bG93Lk9wRGVmQmsKGG9yZy50ZW5zb3JmbG93LmZyYW1ld29ya0ILT3BEZWZQ", + "cm90b3NQAVo9Z2l0aHViLmNvbS90ZW5zb3JmbG93L3RlbnNvcmZsb3cvdGVu", + "c29yZmxvdy9nby9jb3JlL2ZyYW1ld29ya/gBAWIGcHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Tensorflow.AttrValueReflection.Descriptor, global::Tensorflow.TypesReflection.Descriptor, }, - new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.OpDef), global::Tensorflow.OpDef.Parser, new[]{ "Name", "InputArg", "OutputArg", "Attr", "Deprecation", "Summary", "Description", "IsCommutative", "IsAggregate", "IsStateful", "AllowsUninitializedInput" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.OpDef.Types.ArgDef), global::Tensorflow.OpDef.Types.ArgDef.Parser, new[]{ "Name", "Description", "Type", "TypeAttr", "NumberAttr", "TypeListAttr", "IsRef" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.OpDef.Types.AttrDef), global::Tensorflow.OpDef.Types.AttrDef.Parser, new[]{ "Name", "Type", "DefaultValue", "Description", "HasMinimum", "Minimum", "AllowedValues" }, null, null, null)}), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.OpDeprecation), global::Tensorflow.OpDeprecation.Parser, new[]{ "Version", "Explanation" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.OpList), global::Tensorflow.OpList.Parser, new[]{ "Op" }, null, null, null) + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.OpDef), global::Tensorflow.OpDef.Parser, new[]{ "Name", "InputArg", "OutputArg", "ControlOutput", "Attr", "Deprecation", "Summary", "Description", "IsCommutative", "IsAggregate", "IsStateful", "AllowsUninitializedInput" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.OpDef.Types.ArgDef), global::Tensorflow.OpDef.Types.ArgDef.Parser, new[]{ "Name", "Description", "Type", "TypeAttr", "NumberAttr", "TypeListAttr", "IsRef" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.OpDef.Types.AttrDef), global::Tensorflow.OpDef.Types.AttrDef.Parser, new[]{ "Name", "Type", "DefaultValue", "Description", "HasMinimum", "Minimum", "AllowedValues" }, null, null, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.OpDeprecation), global::Tensorflow.OpDeprecation.Parser, new[]{ "Version", "Explanation" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.OpList), global::Tensorflow.OpList.Parser, new[]{ "Op" }, null, null, null, null) })); } #endregion @@ -94,6 +94,7 @@ namespace Tensorflow { name_ = other.name_; inputArg_ = other.inputArg_.Clone(); outputArg_ = other.outputArg_.Clone(); + controlOutput_ = other.controlOutput_.Clone(); attr_ = other.attr_.Clone(); deprecation_ = other.deprecation_ != null ? other.deprecation_.Clone() : null; summary_ = other.summary_; @@ -115,7 +116,7 @@ namespace Tensorflow { private string name_ = ""; /// /// Op names starting with an underscore are reserved for internal use. - /// Names should be CamelCase and match the regexp "[A-Z][a-zA-Z0-9_]*". + /// Names should be CamelCase and match the regexp "[A-Z][a-zA-Z0-9>_]*". /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public string Name { @@ -151,6 +152,20 @@ namespace Tensorflow { get { return outputArg_; } } + /// Field number for the "control_output" field. + public const int ControlOutputFieldNumber = 20; + private static readonly pb::FieldCodec _repeated_controlOutput_codec + = pb::FieldCodec.ForString(162); + private readonly pbc::RepeatedField controlOutput_ = new pbc::RepeatedField(); + /// + /// Named control outputs for this operation. Useful only for composite + /// operations (i.e. functions) which want to name different control outputs. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField ControlOutput { + get { return controlOutput_; } + } + /// Field number for the "attr" field. public const int AttrFieldNumber = 4; private static readonly pb::FieldCodec _repeated_attr_codec @@ -295,6 +310,7 @@ namespace Tensorflow { if (Name != other.Name) return false; if(!inputArg_.Equals(other.inputArg_)) return false; if(!outputArg_.Equals(other.outputArg_)) return false; + if(!controlOutput_.Equals(other.controlOutput_)) return false; if(!attr_.Equals(other.attr_)) return false; if (!object.Equals(Deprecation, other.Deprecation)) return false; if (Summary != other.Summary) return false; @@ -312,6 +328,7 @@ namespace Tensorflow { if (Name.Length != 0) hash ^= Name.GetHashCode(); hash ^= inputArg_.GetHashCode(); hash ^= outputArg_.GetHashCode(); + hash ^= controlOutput_.GetHashCode(); hash ^= attr_.GetHashCode(); if (deprecation_ != null) hash ^= Deprecation.GetHashCode(); if (Summary.Length != 0) hash ^= Summary.GetHashCode(); @@ -368,6 +385,7 @@ namespace Tensorflow { output.WriteRawTag(152, 1); output.WriteBool(AllowsUninitializedInput); } + controlOutput_.WriteTo(output, _repeated_controlOutput_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -381,6 +399,7 @@ namespace Tensorflow { } size += inputArg_.CalculateSize(_repeated_inputArg_codec); size += outputArg_.CalculateSize(_repeated_outputArg_codec); + size += controlOutput_.CalculateSize(_repeated_controlOutput_codec); size += attr_.CalculateSize(_repeated_attr_codec); if (deprecation_ != null) { size += 1 + pb::CodedOutputStream.ComputeMessageSize(Deprecation); @@ -419,10 +438,11 @@ namespace Tensorflow { } inputArg_.Add(other.inputArg_); outputArg_.Add(other.outputArg_); + controlOutput_.Add(other.controlOutput_); attr_.Add(other.attr_); if (other.deprecation_ != null) { if (deprecation_ == null) { - deprecation_ = new global::Tensorflow.OpDeprecation(); + Deprecation = new global::Tensorflow.OpDeprecation(); } Deprecation.MergeFrom(other.Deprecation); } @@ -481,9 +501,9 @@ namespace Tensorflow { } case 66: { if (deprecation_ == null) { - deprecation_ = new global::Tensorflow.OpDeprecation(); + Deprecation = new global::Tensorflow.OpDeprecation(); } - input.ReadMessage(deprecation_); + input.ReadMessage(Deprecation); break; } case 128: { @@ -502,6 +522,10 @@ namespace Tensorflow { AllowsUninitializedInput = input.ReadBool(); break; } + case 162: { + controlOutput_.AddEntriesFrom(input, _repeated_controlOutput_codec); + break; + } } } } @@ -583,7 +607,7 @@ namespace Tensorflow { /// Field number for the "type" field. public const int TypeFieldNumber = 3; - private global::Tensorflow.DataType type_ = 0; + private global::Tensorflow.DataType type_ = global::Tensorflow.DataType.DtInvalid; /// /// Describes the type of one or more tensors that are accepted/produced /// by this input/output arg. The only legal combinations are: @@ -691,7 +715,7 @@ namespace Tensorflow { int hash = 1; if (Name.Length != 0) hash ^= Name.GetHashCode(); if (Description.Length != 0) hash ^= Description.GetHashCode(); - if (Type != 0) hash ^= Type.GetHashCode(); + if (Type != global::Tensorflow.DataType.DtInvalid) hash ^= Type.GetHashCode(); if (TypeAttr.Length != 0) hash ^= TypeAttr.GetHashCode(); if (NumberAttr.Length != 0) hash ^= NumberAttr.GetHashCode(); if (TypeListAttr.Length != 0) hash ^= TypeListAttr.GetHashCode(); @@ -717,7 +741,7 @@ namespace Tensorflow { output.WriteRawTag(18); output.WriteString(Description); } - if (Type != 0) { + if (Type != global::Tensorflow.DataType.DtInvalid) { output.WriteRawTag(24); output.WriteEnum((int) Type); } @@ -751,7 +775,7 @@ namespace Tensorflow { if (Description.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(Description); } - if (Type != 0) { + if (Type != global::Tensorflow.DataType.DtInvalid) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Type); } if (TypeAttr.Length != 0) { @@ -783,7 +807,7 @@ namespace Tensorflow { if (other.Description.Length != 0) { Description = other.Description; } - if (other.Type != 0) { + if (other.Type != global::Tensorflow.DataType.DtInvalid) { Type = other.Type; } if (other.TypeAttr.Length != 0) { @@ -818,7 +842,7 @@ namespace Tensorflow { break; } case 24: { - type_ = (global::Tensorflow.DataType) input.ReadEnum(); + Type = (global::Tensorflow.DataType) input.ReadEnum(); break; } case 34: { @@ -1115,7 +1139,7 @@ namespace Tensorflow { } if (other.defaultValue_ != null) { if (defaultValue_ == null) { - defaultValue_ = new global::Tensorflow.AttrValue(); + DefaultValue = new global::Tensorflow.AttrValue(); } DefaultValue.MergeFrom(other.DefaultValue); } @@ -1130,7 +1154,7 @@ namespace Tensorflow { } if (other.allowedValues_ != null) { if (allowedValues_ == null) { - allowedValues_ = new global::Tensorflow.AttrValue(); + AllowedValues = new global::Tensorflow.AttrValue(); } AllowedValues.MergeFrom(other.AllowedValues); } @@ -1155,9 +1179,9 @@ namespace Tensorflow { } case 26: { if (defaultValue_ == null) { - defaultValue_ = new global::Tensorflow.AttrValue(); + DefaultValue = new global::Tensorflow.AttrValue(); } - input.ReadMessage(defaultValue_); + input.ReadMessage(DefaultValue); break; } case 34: { @@ -1174,9 +1198,9 @@ namespace Tensorflow { } case 58: { if (allowedValues_ == null) { - allowedValues_ = new global::Tensorflow.AttrValue(); + AllowedValues = new global::Tensorflow.AttrValue(); } - input.ReadMessage(allowedValues_); + input.ReadMessage(AllowedValues); break; } } diff --git a/src/TensorFlowNET.Core/Protobuf/ResourceHandle.cs b/src/TensorFlowNET.Core/Protobuf/ResourceHandle.cs index 85f5bf96..4aa49bad 100644 --- a/src/TensorFlowNET.Core/Protobuf/ResourceHandle.cs +++ b/src/TensorFlowNET.Core/Protobuf/ResourceHandle.cs @@ -25,16 +25,22 @@ namespace Tensorflow { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( "Ci90ZW5zb3JmbG93L2NvcmUvZnJhbWV3b3JrL3Jlc291cmNlX2hhbmRsZS5w", - "cm90bxIKdGVuc29yZmxvdyJyChNSZXNvdXJjZUhhbmRsZVByb3RvEg4KBmRl", - "dmljZRgBIAEoCRIRCgljb250YWluZXIYAiABKAkSDAoEbmFtZRgDIAEoCRIR", - "CgloYXNoX2NvZGUYBCABKAQSFwoPbWF5YmVfdHlwZV9uYW1lGAUgASgJQm4K", - "GG9yZy50ZW5zb3JmbG93LmZyYW1ld29ya0IOUmVzb3VyY2VIYW5kbGVQAVo9", - "Z2l0aHViLmNvbS90ZW5zb3JmbG93L3RlbnNvcmZsb3cvdGVuc29yZmxvdy9n", - "by9jb3JlL2ZyYW1ld29ya/gBAWIGcHJvdG8z")); + "cm90bxIKdGVuc29yZmxvdxosdGVuc29yZmxvdy9jb3JlL2ZyYW1ld29yay90", + "ZW5zb3Jfc2hhcGUucHJvdG8aJXRlbnNvcmZsb3cvY29yZS9mcmFtZXdvcmsv", + "dHlwZXMucHJvdG8inwIKE1Jlc291cmNlSGFuZGxlUHJvdG8SDgoGZGV2aWNl", + "GAEgASgJEhEKCWNvbnRhaW5lchgCIAEoCRIMCgRuYW1lGAMgASgJEhEKCWhh", + "c2hfY29kZRgEIAEoBBIXCg9tYXliZV90eXBlX25hbWUYBSABKAkSSAoRZHR5", + "cGVzX2FuZF9zaGFwZXMYBiADKAsyLS50ZW5zb3JmbG93LlJlc291cmNlSGFu", + "ZGxlUHJvdG8uRHR5cGVBbmRTaGFwZRphCg1EdHlwZUFuZFNoYXBlEiMKBWR0", + "eXBlGAEgASgOMhQudGVuc29yZmxvdy5EYXRhVHlwZRIrCgVzaGFwZRgCIAEo", + "CzIcLnRlbnNvcmZsb3cuVGVuc29yU2hhcGVQcm90b0JuChhvcmcudGVuc29y", + "Zmxvdy5mcmFtZXdvcmtCDlJlc291cmNlSGFuZGxlUAFaPWdpdGh1Yi5jb20v", + "dGVuc29yZmxvdy90ZW5zb3JmbG93L3RlbnNvcmZsb3cvZ28vY29yZS9mcmFt", + "ZXdvcmv4AQFiBnByb3RvMw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, - new pbr::FileDescriptor[] { }, - new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.ResourceHandleProto), global::Tensorflow.ResourceHandleProto.Parser, new[]{ "Device", "Container", "Name", "HashCode", "MaybeTypeName" }, null, null, null) + new pbr::FileDescriptor[] { global::Tensorflow.TensorShapeReflection.Descriptor, global::Tensorflow.TypesReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.ResourceHandleProto), global::Tensorflow.ResourceHandleProto.Parser, new[]{ "Device", "Container", "Name", "HashCode", "MaybeTypeName", "DtypesAndShapes" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.ResourceHandleProto.Types.DtypeAndShape), global::Tensorflow.ResourceHandleProto.Types.DtypeAndShape.Parser, new[]{ "Dtype", "Shape" }, null, null, null, null)}) })); } #endregion @@ -76,6 +82,7 @@ namespace Tensorflow { name_ = other.name_; hashCode_ = other.hashCode_; maybeTypeName_ = other.maybeTypeName_; + dtypesAndShapes_ = other.dtypesAndShapes_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -156,6 +163,19 @@ namespace Tensorflow { } } + /// Field number for the "dtypes_and_shapes" field. + public const int DtypesAndShapesFieldNumber = 6; + private static readonly pb::FieldCodec _repeated_dtypesAndShapes_codec + = pb::FieldCodec.ForMessage(50, global::Tensorflow.ResourceHandleProto.Types.DtypeAndShape.Parser); + private readonly pbc::RepeatedField dtypesAndShapes_ = new pbc::RepeatedField(); + /// + /// Data types and shapes for the underlying resource. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField DtypesAndShapes { + get { return dtypesAndShapes_; } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as ResourceHandleProto); @@ -174,6 +194,7 @@ namespace Tensorflow { if (Name != other.Name) return false; if (HashCode != other.HashCode) return false; if (MaybeTypeName != other.MaybeTypeName) return false; + if(!dtypesAndShapes_.Equals(other.dtypesAndShapes_)) return false; return Equals(_unknownFields, other._unknownFields); } @@ -185,6 +206,7 @@ namespace Tensorflow { if (Name.Length != 0) hash ^= Name.GetHashCode(); if (HashCode != 0UL) hash ^= HashCode.GetHashCode(); if (MaybeTypeName.Length != 0) hash ^= MaybeTypeName.GetHashCode(); + hash ^= dtypesAndShapes_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -218,6 +240,7 @@ namespace Tensorflow { output.WriteRawTag(42); output.WriteString(MaybeTypeName); } + dtypesAndShapes_.WriteTo(output, _repeated_dtypesAndShapes_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -241,6 +264,7 @@ namespace Tensorflow { if (MaybeTypeName.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(MaybeTypeName); } + size += dtypesAndShapes_.CalculateSize(_repeated_dtypesAndShapes_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -267,6 +291,7 @@ namespace Tensorflow { if (other.MaybeTypeName.Length != 0) { MaybeTypeName = other.MaybeTypeName; } + dtypesAndShapes_.Add(other.dtypesAndShapes_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -298,9 +323,186 @@ namespace Tensorflow { MaybeTypeName = input.ReadString(); break; } + case 50: { + dtypesAndShapes_.AddEntriesFrom(input, _repeated_dtypesAndShapes_codec); + break; + } + } + } + } + + #region Nested types + /// Container for nested types declared in the ResourceHandleProto message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static partial class Types { + /// + /// Protocol buffer representing a pair of (data type, tensor shape). + /// + public sealed partial class DtypeAndShape : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DtypeAndShape()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.ResourceHandleProto.Descriptor.NestedTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public DtypeAndShape() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public DtypeAndShape(DtypeAndShape other) : this() { + dtype_ = other.dtype_; + shape_ = other.shape_ != null ? other.shape_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public DtypeAndShape Clone() { + return new DtypeAndShape(this); + } + + /// Field number for the "dtype" field. + public const int DtypeFieldNumber = 1; + private global::Tensorflow.DataType dtype_ = global::Tensorflow.DataType.DtInvalid; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.DataType Dtype { + get { return dtype_; } + set { + dtype_ = value; + } + } + + /// Field number for the "shape" field. + public const int ShapeFieldNumber = 2; + private global::Tensorflow.TensorShapeProto shape_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.TensorShapeProto Shape { + get { return shape_; } + set { + shape_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as DtypeAndShape); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(DtypeAndShape other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Dtype != other.Dtype) return false; + if (!object.Equals(Shape, other.Shape)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Dtype != global::Tensorflow.DataType.DtInvalid) hash ^= Dtype.GetHashCode(); + if (shape_ != null) hash ^= Shape.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (Dtype != global::Tensorflow.DataType.DtInvalid) { + output.WriteRawTag(8); + output.WriteEnum((int) Dtype); + } + if (shape_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Shape); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Dtype != global::Tensorflow.DataType.DtInvalid) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Dtype); + } + if (shape_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Shape); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(DtypeAndShape other) { + if (other == null) { + return; + } + if (other.Dtype != global::Tensorflow.DataType.DtInvalid) { + Dtype = other.Dtype; + } + if (other.shape_ != null) { + if (shape_ == null) { + Shape = new global::Tensorflow.TensorShapeProto(); + } + Shape.MergeFrom(other.Shape); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Dtype = (global::Tensorflow.DataType) input.ReadEnum(); + break; + } + case 18: { + if (shape_ == null) { + Shape = new global::Tensorflow.TensorShapeProto(); + } + input.ReadMessage(Shape); + break; + } + } + } + } + } + } + #endregion } diff --git a/src/TensorFlowNET.Core/Protobuf/RewriterConfig.cs b/src/TensorFlowNET.Core/Protobuf/RewriterConfig.cs index dceb52c3..89f8fddc 100644 --- a/src/TensorFlowNET.Core/Protobuf/RewriterConfig.cs +++ b/src/TensorFlowNET.Core/Protobuf/RewriterConfig.cs @@ -26,58 +26,65 @@ namespace Tensorflow { string.Concat( "Ci50ZW5zb3JmbG93L2NvcmUvcHJvdG9idWYvcmV3cml0ZXJfY29uZmlnLnBy", "b3RvEgp0ZW5zb3JmbG93Gip0ZW5zb3JmbG93L2NvcmUvZnJhbWV3b3JrL2F0", - "dHJfdmFsdWUucHJvdG8iOwoTQXV0b1BhcmFsbGVsT3B0aW9ucxIOCgZlbmFi", - "bGUYASABKAgSFAoMbnVtX3JlcGxpY2FzGAIgASgFIisKFlNjb3BlZEFsbG9j", - "YXRvck9wdGlvbnMSEQoJZW5hYmxlX29wGAEgAygJIvUNCg5SZXdyaXRlckNv", - "bmZpZxI7ChBsYXlvdXRfb3B0aW1pemVyGAEgASgOMiEudGVuc29yZmxvdy5S", - "ZXdyaXRlckNvbmZpZy5Ub2dnbGUSOwoQY29uc3RhbnRfZm9sZGluZxgDIAEo", - "DjIhLnRlbnNvcmZsb3cuUmV3cml0ZXJDb25maWcuVG9nZ2xlEj0KEnNoYXBl", - "X29wdGltaXphdGlvbhgNIAEoDjIhLnRlbnNvcmZsb3cuUmV3cml0ZXJDb25m", - "aWcuVG9nZ2xlEjQKCXJlbWFwcGluZxgOIAEoDjIhLnRlbnNvcmZsb3cuUmV3", - "cml0ZXJDb25maWcuVG9nZ2xlEkIKF2FyaXRobWV0aWNfb3B0aW1pemF0aW9u", - "GAcgASgOMiEudGVuc29yZmxvdy5SZXdyaXRlckNvbmZpZy5Ub2dnbGUSQgoX", - "ZGVwZW5kZW5jeV9vcHRpbWl6YXRpb24YCCABKA4yIS50ZW5zb3JmbG93LlJl", - "d3JpdGVyQ29uZmlnLlRvZ2dsZRI8ChFsb29wX29wdGltaXphdGlvbhgJIAEo", - "DjIhLnRlbnNvcmZsb3cuUmV3cml0ZXJDb25maWcuVG9nZ2xlEkAKFWZ1bmN0", - "aW9uX29wdGltaXphdGlvbhgKIAEoDjIhLnRlbnNvcmZsb3cuUmV3cml0ZXJD", - "b25maWcuVG9nZ2xlEjkKDmRlYnVnX3N0cmlwcGVyGAsgASgOMiEudGVuc29y", - "Zmxvdy5SZXdyaXRlckNvbmZpZy5Ub2dnbGUSHQoVZGlzYWJsZV9tb2RlbF9w", - "cnVuaW5nGAIgASgIEkgKHXNjb3BlZF9hbGxvY2F0b3Jfb3B0aW1pemF0aW9u", - "GA8gASgOMiEudGVuc29yZmxvdy5SZXdyaXRlckNvbmZpZy5Ub2dnbGUSQwoY", - "cGluX3RvX2hvc3Rfb3B0aW1pemF0aW9uGBIgASgOMiEudGVuc29yZmxvdy5S", - "ZXdyaXRlckNvbmZpZy5Ub2dnbGUSHgoWZGlzYWJsZV9tZXRhX29wdGltaXpl", - "chgTIAEoCBJPChltZXRhX29wdGltaXplcl9pdGVyYXRpb25zGAwgASgOMiwu", - "dGVuc29yZmxvdy5SZXdyaXRlckNvbmZpZy5OdW1JdGVyYXRpb25zVHlwZRIX", - "Cg9taW5fZ3JhcGhfbm9kZXMYESABKAUSQgoTbWVtb3J5X29wdGltaXphdGlv", - "bhgEIAEoDjIlLnRlbnNvcmZsb3cuUmV3cml0ZXJDb25maWcuTWVtT3B0VHlw", - "ZRIvCidtZW1vcnlfb3B0aW1pemVyX3RhcmdldF9ub2RlX25hbWVfc2NvcGUY", - "BiABKAkSIQoZbWV0YV9vcHRpbWl6ZXJfdGltZW91dF9tcxgUIAEoAxI2Cg1h", - "dXRvX3BhcmFsbGVsGAUgASgLMh8udGVuc29yZmxvdy5BdXRvUGFyYWxsZWxP", - "cHRpb25zEiAKGGZhaWxfb25fb3B0aW1pemVyX2Vycm9ycxgVIAEoCBJBChVz", - "Y29wZWRfYWxsb2NhdG9yX29wdHMYECABKAsyIi50ZW5zb3JmbG93LlNjb3Bl", - "ZEFsbG9jYXRvck9wdGlvbnMSEgoKb3B0aW1pemVycxhkIAMoCRJLChFjdXN0", - "b21fb3B0aW1pemVycxjIASADKAsyLy50ZW5zb3JmbG93LlJld3JpdGVyQ29u", - "ZmlnLkN1c3RvbUdyYXBoT3B0aW1pemVyGsoBChRDdXN0b21HcmFwaE9wdGlt", - "aXplchIMCgRuYW1lGAEgASgJElgKDXBhcmFtZXRlcl9tYXAYAiADKAsyQS50", - "ZW5zb3JmbG93LlJld3JpdGVyQ29uZmlnLkN1c3RvbUdyYXBoT3B0aW1pemVy", - "LlBhcmFtZXRlck1hcEVudHJ5GkoKEVBhcmFtZXRlck1hcEVudHJ5EgsKA2tl", - "eRgBIAEoCRIkCgV2YWx1ZRgCIAEoCzIVLnRlbnNvcmZsb3cuQXR0clZhbHVl", - "OgI4ASI2CgZUb2dnbGUSCwoHREVGQVVMVBAAEgYKAk9OEAESBwoDT0ZGEAIS", - "DgoKQUdHUkVTU0lWRRADIjwKEU51bUl0ZXJhdGlvbnNUeXBlEhUKEURFRkFV", - "TFRfTlVNX0lURVJTEAASBwoDT05FEAESBwoDVFdPEAIinwEKCk1lbU9wdFR5", - "cGUSEwoPREVGQVVMVF9NRU1fT1BUEAASDgoKTk9fTUVNX09QVBABEgoKBk1B", - "TlVBTBACEhcKE1NXQVBQSU5HX0hFVVJJU1RJQ1MQBBIcChhSRUNPTVBVVEFU", - "SU9OX0hFVVJJU1RJQ1MQBRIZChVTQ0hFRFVMSU5HX0hFVVJJU1RJQ1MQBhIO", - "CgpIRVVSSVNUSUNTEANCcwoYb3JnLnRlbnNvcmZsb3cuZnJhbWV3b3JrQhRS", - "ZXdyaXRlckNvbmZpZ1Byb3Rvc1ABWjxnaXRodWIuY29tL3RlbnNvcmZsb3cv", - "dGVuc29yZmxvdy90ZW5zb3JmbG93L2dvL2NvcmUvcHJvdG9idWb4AQFiBnBy", - "b3RvMw==")); + "dHJfdmFsdWUucHJvdG8aLnRlbnNvcmZsb3cvY29yZS9wcm90b2J1Zi92ZXJp", + "Zmllcl9jb25maWcucHJvdG8iOwoTQXV0b1BhcmFsbGVsT3B0aW9ucxIOCgZl", + "bmFibGUYASABKAgSFAoMbnVtX3JlcGxpY2FzGAIgASgFIisKFlNjb3BlZEFs", + "bG9jYXRvck9wdGlvbnMSEQoJZW5hYmxlX29wGAEgAygJIogQCg5SZXdyaXRl", + "ckNvbmZpZxI7ChBsYXlvdXRfb3B0aW1pemVyGAEgASgOMiEudGVuc29yZmxv", + "dy5SZXdyaXRlckNvbmZpZy5Ub2dnbGUSOwoQY29uc3RhbnRfZm9sZGluZxgD", + "IAEoDjIhLnRlbnNvcmZsb3cuUmV3cml0ZXJDb25maWcuVG9nZ2xlEj0KEnNo", + "YXBlX29wdGltaXphdGlvbhgNIAEoDjIhLnRlbnNvcmZsb3cuUmV3cml0ZXJD", + "b25maWcuVG9nZ2xlEjQKCXJlbWFwcGluZxgOIAEoDjIhLnRlbnNvcmZsb3cu", + "UmV3cml0ZXJDb25maWcuVG9nZ2xlEkIKF2FyaXRobWV0aWNfb3B0aW1pemF0", + "aW9uGAcgASgOMiEudGVuc29yZmxvdy5SZXdyaXRlckNvbmZpZy5Ub2dnbGUS", + "QgoXZGVwZW5kZW5jeV9vcHRpbWl6YXRpb24YCCABKA4yIS50ZW5zb3JmbG93", + "LlJld3JpdGVyQ29uZmlnLlRvZ2dsZRI8ChFsb29wX29wdGltaXphdGlvbhgJ", + "IAEoDjIhLnRlbnNvcmZsb3cuUmV3cml0ZXJDb25maWcuVG9nZ2xlEkAKFWZ1", + "bmN0aW9uX29wdGltaXphdGlvbhgKIAEoDjIhLnRlbnNvcmZsb3cuUmV3cml0", + "ZXJDb25maWcuVG9nZ2xlEjkKDmRlYnVnX3N0cmlwcGVyGAsgASgOMiEudGVu", + "c29yZmxvdy5SZXdyaXRlckNvbmZpZy5Ub2dnbGUSHQoVZGlzYWJsZV9tb2Rl", + "bF9wcnVuaW5nGAIgASgIEkgKHXNjb3BlZF9hbGxvY2F0b3Jfb3B0aW1pemF0", + "aW9uGA8gASgOMiEudGVuc29yZmxvdy5SZXdyaXRlckNvbmZpZy5Ub2dnbGUS", + "QwoYcGluX3RvX2hvc3Rfb3B0aW1pemF0aW9uGBIgASgOMiEudGVuc29yZmxv", + "dy5SZXdyaXRlckNvbmZpZy5Ub2dnbGUSQgoXaW1wbGVtZW50YXRpb25fc2Vs", + "ZWN0b3IYFiABKA4yIS50ZW5zb3JmbG93LlJld3JpdGVyQ29uZmlnLlRvZ2ds", + "ZRI/ChRhdXRvX21peGVkX3ByZWNpc2lvbhgXIAEoDjIhLnRlbnNvcmZsb3cu", + "UmV3cml0ZXJDb25maWcuVG9nZ2xlEh4KFmRpc2FibGVfbWV0YV9vcHRpbWl6", + "ZXIYEyABKAgSTwoZbWV0YV9vcHRpbWl6ZXJfaXRlcmF0aW9ucxgMIAEoDjIs", + "LnRlbnNvcmZsb3cuUmV3cml0ZXJDb25maWcuTnVtSXRlcmF0aW9uc1R5cGUS", + "FwoPbWluX2dyYXBoX25vZGVzGBEgASgFEkIKE21lbW9yeV9vcHRpbWl6YXRp", + "b24YBCABKA4yJS50ZW5zb3JmbG93LlJld3JpdGVyQ29uZmlnLk1lbU9wdFR5", + "cGUSLwonbWVtb3J5X29wdGltaXplcl90YXJnZXRfbm9kZV9uYW1lX3Njb3Bl", + "GAYgASgJEiEKGW1ldGFfb3B0aW1pemVyX3RpbWVvdXRfbXMYFCABKAMSNgoN", + "YXV0b19wYXJhbGxlbBgFIAEoCzIfLnRlbnNvcmZsb3cuQXV0b1BhcmFsbGVs", + "T3B0aW9ucxIgChhmYWlsX29uX29wdGltaXplcl9lcnJvcnMYFSABKAgSQQoV", + "c2NvcGVkX2FsbG9jYXRvcl9vcHRzGBAgASgLMiIudGVuc29yZmxvdy5TY29w", + "ZWRBbGxvY2F0b3JPcHRpb25zEhIKCm9wdGltaXplcnMYZCADKAkSSwoRY3Vz", + "dG9tX29wdGltaXplcnMYyAEgAygLMi8udGVuc29yZmxvdy5SZXdyaXRlckNv", + "bmZpZy5DdXN0b21HcmFwaE9wdGltaXplchJECh9pbnRlcl9vcHRpbWl6ZXJf", + "dmVyaWZpZXJfY29uZmlnGKwCIAEoCzIaLnRlbnNvcmZsb3cuVmVyaWZpZXJD", + "b25maWcSRgohcG9zdF9vcHRpbWl6YXRpb25fdmVyaWZpZXJfY29uZmlnGK0C", + "IAEoCzIaLnRlbnNvcmZsb3cuVmVyaWZpZXJDb25maWcaygEKFEN1c3RvbUdy", + "YXBoT3B0aW1pemVyEgwKBG5hbWUYASABKAkSWAoNcGFyYW1ldGVyX21hcBgC", + "IAMoCzJBLnRlbnNvcmZsb3cuUmV3cml0ZXJDb25maWcuQ3VzdG9tR3JhcGhP", + "cHRpbWl6ZXIuUGFyYW1ldGVyTWFwRW50cnkaSgoRUGFyYW1ldGVyTWFwRW50", + "cnkSCwoDa2V5GAEgASgJEiQKBXZhbHVlGAIgASgLMhUudGVuc29yZmxvdy5B", + "dHRyVmFsdWU6AjgBIjYKBlRvZ2dsZRILCgdERUZBVUxUEAASBgoCT04QARIH", + "CgNPRkYQAhIOCgpBR0dSRVNTSVZFEAMiPAoRTnVtSXRlcmF0aW9uc1R5cGUS", + "FQoRREVGQVVMVF9OVU1fSVRFUlMQABIHCgNPTkUQARIHCgNUV08QAiKfAQoK", + "TWVtT3B0VHlwZRITCg9ERUZBVUxUX01FTV9PUFQQABIOCgpOT19NRU1fT1BU", + "EAESCgoGTUFOVUFMEAISFwoTU1dBUFBJTkdfSEVVUklTVElDUxAEEhwKGFJF", + "Q09NUFVUQVRJT05fSEVVUklTVElDUxAFEhkKFVNDSEVEVUxJTkdfSEVVUklT", + "VElDUxAGEg4KCkhFVVJJU1RJQ1MQA0JzChhvcmcudGVuc29yZmxvdy5mcmFt", + "ZXdvcmtCFFJld3JpdGVyQ29uZmlnUHJvdG9zUAFaPGdpdGh1Yi5jb20vdGVu", + "c29yZmxvdy90ZW5zb3JmbG93L3RlbnNvcmZsb3cvZ28vY29yZS9wcm90b2J1", + "ZvgBAWIGcHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, - new pbr::FileDescriptor[] { global::Tensorflow.AttrValueReflection.Descriptor, }, - new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.AutoParallelOptions), global::Tensorflow.AutoParallelOptions.Parser, new[]{ "Enable", "NumReplicas" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.ScopedAllocatorOptions), global::Tensorflow.ScopedAllocatorOptions.Parser, new[]{ "EnableOp" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.RewriterConfig), global::Tensorflow.RewriterConfig.Parser, new[]{ "LayoutOptimizer", "ConstantFolding", "ShapeOptimization", "Remapping", "ArithmeticOptimization", "DependencyOptimization", "LoopOptimization", "FunctionOptimization", "DebugStripper", "DisableModelPruning", "ScopedAllocatorOptimization", "PinToHostOptimization", "DisableMetaOptimizer", "MetaOptimizerIterations", "MinGraphNodes", "MemoryOptimization", "MemoryOptimizerTargetNodeNameScope", "MetaOptimizerTimeoutMs", "AutoParallel", "FailOnOptimizerErrors", "ScopedAllocatorOpts", "Optimizers", "CustomOptimizers" }, null, new[]{ typeof(global::Tensorflow.RewriterConfig.Types.Toggle), typeof(global::Tensorflow.RewriterConfig.Types.NumIterationsType), typeof(global::Tensorflow.RewriterConfig.Types.MemOptType) }, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.RewriterConfig.Types.CustomGraphOptimizer), global::Tensorflow.RewriterConfig.Types.CustomGraphOptimizer.Parser, new[]{ "Name", "ParameterMap" }, null, null, new pbr::GeneratedClrTypeInfo[] { null, })}) + new pbr::FileDescriptor[] { global::Tensorflow.AttrValueReflection.Descriptor, global::Tensorflow.VerifierConfigReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.AutoParallelOptions), global::Tensorflow.AutoParallelOptions.Parser, new[]{ "Enable", "NumReplicas" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.ScopedAllocatorOptions), global::Tensorflow.ScopedAllocatorOptions.Parser, new[]{ "EnableOp" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.RewriterConfig), global::Tensorflow.RewriterConfig.Parser, new[]{ "LayoutOptimizer", "ConstantFolding", "ShapeOptimization", "Remapping", "ArithmeticOptimization", "DependencyOptimization", "LoopOptimization", "FunctionOptimization", "DebugStripper", "DisableModelPruning", "ScopedAllocatorOptimization", "PinToHostOptimization", "ImplementationSelector", "AutoMixedPrecision", "DisableMetaOptimizer", "MetaOptimizerIterations", "MinGraphNodes", "MemoryOptimization", "MemoryOptimizerTargetNodeNameScope", "MetaOptimizerTimeoutMs", "AutoParallel", "FailOnOptimizerErrors", "ScopedAllocatorOpts", "Optimizers", "CustomOptimizers", "InterOptimizerVerifierConfig", "PostOptimizationVerifierConfig" }, null, new[]{ typeof(global::Tensorflow.RewriterConfig.Types.Toggle), typeof(global::Tensorflow.RewriterConfig.Types.NumIterationsType), typeof(global::Tensorflow.RewriterConfig.Types.MemOptType) }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.RewriterConfig.Types.CustomGraphOptimizer), global::Tensorflow.RewriterConfig.Types.CustomGraphOptimizer.Parser, new[]{ "Name", "ParameterMap" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, })}) })); } #endregion @@ -406,6 +413,8 @@ namespace Tensorflow { disableModelPruning_ = other.disableModelPruning_; scopedAllocatorOptimization_ = other.scopedAllocatorOptimization_; pinToHostOptimization_ = other.pinToHostOptimization_; + implementationSelector_ = other.implementationSelector_; + autoMixedPrecision_ = other.autoMixedPrecision_; disableMetaOptimizer_ = other.disableMetaOptimizer_; metaOptimizerIterations_ = other.metaOptimizerIterations_; minGraphNodes_ = other.minGraphNodes_; @@ -417,6 +426,8 @@ namespace Tensorflow { scopedAllocatorOpts_ = other.scopedAllocatorOpts_ != null ? other.scopedAllocatorOpts_.Clone() : null; optimizers_ = other.optimizers_.Clone(); customOptimizers_ = other.customOptimizers_.Clone(); + interOptimizerVerifierConfig_ = other.interOptimizerVerifierConfig_ != null ? other.interOptimizerVerifierConfig_.Clone() : null; + postOptimizationVerifierConfig_ = other.postOptimizationVerifierConfig_ != null ? other.postOptimizationVerifierConfig_.Clone() : null; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -427,7 +438,7 @@ namespace Tensorflow { /// Field number for the "layout_optimizer" field. public const int LayoutOptimizerFieldNumber = 1; - private global::Tensorflow.RewriterConfig.Types.Toggle layoutOptimizer_ = 0; + private global::Tensorflow.RewriterConfig.Types.Toggle layoutOptimizer_ = global::Tensorflow.RewriterConfig.Types.Toggle.Default; /// /// Optimize tensor layouts (default is ON) /// e.g. This will try to use NCHW layout on GPU which is faster. @@ -442,7 +453,7 @@ namespace Tensorflow { /// Field number for the "constant_folding" field. public const int ConstantFoldingFieldNumber = 3; - private global::Tensorflow.RewriterConfig.Types.Toggle constantFolding_ = 0; + private global::Tensorflow.RewriterConfig.Types.Toggle constantFolding_ = global::Tensorflow.RewriterConfig.Types.Toggle.Default; /// /// Fold constants (default is ON) /// Statically infer the value of tensors when possible, and materialize the @@ -458,7 +469,7 @@ namespace Tensorflow { /// Field number for the "shape_optimization" field. public const int ShapeOptimizationFieldNumber = 13; - private global::Tensorflow.RewriterConfig.Types.Toggle shapeOptimization_ = 0; + private global::Tensorflow.RewriterConfig.Types.Toggle shapeOptimization_ = global::Tensorflow.RewriterConfig.Types.Toggle.Default; /// /// Shape optimizations (default is ON) /// Simplify computations made on shapes. @@ -473,7 +484,7 @@ namespace Tensorflow { /// Field number for the "remapping" field. public const int RemappingFieldNumber = 14; - private global::Tensorflow.RewriterConfig.Types.Toggle remapping_ = 0; + private global::Tensorflow.RewriterConfig.Types.Toggle remapping_ = global::Tensorflow.RewriterConfig.Types.Toggle.Default; /// /// Remapping (default is ON) /// Remap subgraphs onto more efficient implementations. @@ -488,7 +499,7 @@ namespace Tensorflow { /// Field number for the "arithmetic_optimization" field. public const int ArithmeticOptimizationFieldNumber = 7; - private global::Tensorflow.RewriterConfig.Types.Toggle arithmeticOptimization_ = 0; + private global::Tensorflow.RewriterConfig.Types.Toggle arithmeticOptimization_ = global::Tensorflow.RewriterConfig.Types.Toggle.Default; /// /// Arithmetic optimizations (default is ON) /// e.g. Simplify arithmetic ops; merge ops with same value (like constants). @@ -503,7 +514,7 @@ namespace Tensorflow { /// Field number for the "dependency_optimization" field. public const int DependencyOptimizationFieldNumber = 8; - private global::Tensorflow.RewriterConfig.Types.Toggle dependencyOptimization_ = 0; + private global::Tensorflow.RewriterConfig.Types.Toggle dependencyOptimization_ = global::Tensorflow.RewriterConfig.Types.Toggle.Default; /// /// Control dependency optimizations (default is ON). /// Remove redundant control dependencies, which may enable other optimization. @@ -518,7 +529,7 @@ namespace Tensorflow { /// Field number for the "loop_optimization" field. public const int LoopOptimizationFieldNumber = 9; - private global::Tensorflow.RewriterConfig.Types.Toggle loopOptimization_ = 0; + private global::Tensorflow.RewriterConfig.Types.Toggle loopOptimization_ = global::Tensorflow.RewriterConfig.Types.Toggle.Default; /// /// Loop optimizations (default is ON). /// @@ -532,7 +543,7 @@ namespace Tensorflow { /// Field number for the "function_optimization" field. public const int FunctionOptimizationFieldNumber = 10; - private global::Tensorflow.RewriterConfig.Types.Toggle functionOptimization_ = 0; + private global::Tensorflow.RewriterConfig.Types.Toggle functionOptimization_ = global::Tensorflow.RewriterConfig.Types.Toggle.Default; /// /// Function optimizations (default is ON). /// @@ -546,7 +557,7 @@ namespace Tensorflow { /// Field number for the "debug_stripper" field. public const int DebugStripperFieldNumber = 11; - private global::Tensorflow.RewriterConfig.Types.Toggle debugStripper_ = 0; + private global::Tensorflow.RewriterConfig.Types.Toggle debugStripper_ = global::Tensorflow.RewriterConfig.Types.Toggle.Default; /// /// Strips debug-related nodes from the graph (off by default). /// @@ -574,7 +585,7 @@ namespace Tensorflow { /// Field number for the "scoped_allocator_optimization" field. public const int ScopedAllocatorOptimizationFieldNumber = 15; - private global::Tensorflow.RewriterConfig.Types.Toggle scopedAllocatorOptimization_ = 0; + private global::Tensorflow.RewriterConfig.Types.Toggle scopedAllocatorOptimization_ = global::Tensorflow.RewriterConfig.Types.Toggle.Default; /// /// Try to allocate some independent Op outputs contiguously in order to /// merge or eliminate downstream Ops (off by default). @@ -589,7 +600,7 @@ namespace Tensorflow { /// Field number for the "pin_to_host_optimization" field. public const int PinToHostOptimizationFieldNumber = 18; - private global::Tensorflow.RewriterConfig.Types.Toggle pinToHostOptimization_ = 0; + private global::Tensorflow.RewriterConfig.Types.Toggle pinToHostOptimization_ = global::Tensorflow.RewriterConfig.Types.Toggle.Default; /// /// Force small ops onto the CPU (default is OFF). /// @@ -601,6 +612,38 @@ namespace Tensorflow { } } + /// Field number for the "implementation_selector" field. + public const int ImplementationSelectorFieldNumber = 22; + private global::Tensorflow.RewriterConfig.Types.Toggle implementationSelector_ = global::Tensorflow.RewriterConfig.Types.Toggle.Default; + /// + /// Enable the swap of kernel implementations based on the device placement + /// (default is ON). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.RewriterConfig.Types.Toggle ImplementationSelector { + get { return implementationSelector_; } + set { + implementationSelector_ = value; + } + } + + /// Field number for the "auto_mixed_precision" field. + public const int AutoMixedPrecisionFieldNumber = 23; + private global::Tensorflow.RewriterConfig.Types.Toggle autoMixedPrecision_ = global::Tensorflow.RewriterConfig.Types.Toggle.Default; + /// + /// Optimize data types (default is OFF). + /// e.g., This will try to use float16 on GPU which is faster. + /// Note that this can change the numerical stability of the graph and may + /// require the use of loss scaling to maintain model convergence. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.RewriterConfig.Types.Toggle AutoMixedPrecision { + get { return autoMixedPrecision_; } + set { + autoMixedPrecision_ = value; + } + } + /// Field number for the "disable_meta_optimizer" field. public const int DisableMetaOptimizerFieldNumber = 19; private bool disableMetaOptimizer_; @@ -617,7 +660,7 @@ namespace Tensorflow { /// Field number for the "meta_optimizer_iterations" field. public const int MetaOptimizerIterationsFieldNumber = 12; - private global::Tensorflow.RewriterConfig.Types.NumIterationsType metaOptimizerIterations_ = 0; + private global::Tensorflow.RewriterConfig.Types.NumIterationsType metaOptimizerIterations_ = global::Tensorflow.RewriterConfig.Types.NumIterationsType.DefaultNumIters; /// /// Controls how many times we run the optimizers in meta optimizer (default /// is once). @@ -649,7 +692,7 @@ namespace Tensorflow { /// Field number for the "memory_optimization" field. public const int MemoryOptimizationFieldNumber = 4; - private global::Tensorflow.RewriterConfig.Types.MemOptType memoryOptimization_ = 0; + private global::Tensorflow.RewriterConfig.Types.MemOptType memoryOptimization_ = global::Tensorflow.RewriterConfig.Types.MemOptType.DefaultMemOpt; /// /// Configures memory optimization passes through the meta-optimizer. Has no /// effect on manually requested memory optimization passes in the optimizers @@ -779,6 +822,35 @@ namespace Tensorflow { get { return customOptimizers_; } } + /// Field number for the "inter_optimizer_verifier_config" field. + public const int InterOptimizerVerifierConfigFieldNumber = 300; + private global::Tensorflow.VerifierConfig interOptimizerVerifierConfig_; + /// + /// VerifierConfig specifying the verifiers to be run after every optimizer. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.VerifierConfig InterOptimizerVerifierConfig { + get { return interOptimizerVerifierConfig_; } + set { + interOptimizerVerifierConfig_ = value; + } + } + + /// Field number for the "post_optimization_verifier_config" field. + public const int PostOptimizationVerifierConfigFieldNumber = 301; + private global::Tensorflow.VerifierConfig postOptimizationVerifierConfig_; + /// + /// VerifierConfig specifying the verifiers to be run at the end, after all + /// optimizers have run. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.VerifierConfig PostOptimizationVerifierConfig { + get { return postOptimizationVerifierConfig_; } + set { + postOptimizationVerifierConfig_ = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as RewriterConfig); @@ -804,6 +876,8 @@ namespace Tensorflow { if (DisableModelPruning != other.DisableModelPruning) return false; if (ScopedAllocatorOptimization != other.ScopedAllocatorOptimization) return false; if (PinToHostOptimization != other.PinToHostOptimization) return false; + if (ImplementationSelector != other.ImplementationSelector) return false; + if (AutoMixedPrecision != other.AutoMixedPrecision) return false; if (DisableMetaOptimizer != other.DisableMetaOptimizer) return false; if (MetaOptimizerIterations != other.MetaOptimizerIterations) return false; if (MinGraphNodes != other.MinGraphNodes) return false; @@ -815,28 +889,32 @@ namespace Tensorflow { if (!object.Equals(ScopedAllocatorOpts, other.ScopedAllocatorOpts)) return false; if(!optimizers_.Equals(other.optimizers_)) return false; if(!customOptimizers_.Equals(other.customOptimizers_)) return false; + if (!object.Equals(InterOptimizerVerifierConfig, other.InterOptimizerVerifierConfig)) return false; + if (!object.Equals(PostOptimizationVerifierConfig, other.PostOptimizationVerifierConfig)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; - if (LayoutOptimizer != 0) hash ^= LayoutOptimizer.GetHashCode(); - if (ConstantFolding != 0) hash ^= ConstantFolding.GetHashCode(); - if (ShapeOptimization != 0) hash ^= ShapeOptimization.GetHashCode(); - if (Remapping != 0) hash ^= Remapping.GetHashCode(); - if (ArithmeticOptimization != 0) hash ^= ArithmeticOptimization.GetHashCode(); - if (DependencyOptimization != 0) hash ^= DependencyOptimization.GetHashCode(); - if (LoopOptimization != 0) hash ^= LoopOptimization.GetHashCode(); - if (FunctionOptimization != 0) hash ^= FunctionOptimization.GetHashCode(); - if (DebugStripper != 0) hash ^= DebugStripper.GetHashCode(); + if (LayoutOptimizer != global::Tensorflow.RewriterConfig.Types.Toggle.Default) hash ^= LayoutOptimizer.GetHashCode(); + if (ConstantFolding != global::Tensorflow.RewriterConfig.Types.Toggle.Default) hash ^= ConstantFolding.GetHashCode(); + if (ShapeOptimization != global::Tensorflow.RewriterConfig.Types.Toggle.Default) hash ^= ShapeOptimization.GetHashCode(); + if (Remapping != global::Tensorflow.RewriterConfig.Types.Toggle.Default) hash ^= Remapping.GetHashCode(); + if (ArithmeticOptimization != global::Tensorflow.RewriterConfig.Types.Toggle.Default) hash ^= ArithmeticOptimization.GetHashCode(); + if (DependencyOptimization != global::Tensorflow.RewriterConfig.Types.Toggle.Default) hash ^= DependencyOptimization.GetHashCode(); + if (LoopOptimization != global::Tensorflow.RewriterConfig.Types.Toggle.Default) hash ^= LoopOptimization.GetHashCode(); + if (FunctionOptimization != global::Tensorflow.RewriterConfig.Types.Toggle.Default) hash ^= FunctionOptimization.GetHashCode(); + if (DebugStripper != global::Tensorflow.RewriterConfig.Types.Toggle.Default) hash ^= DebugStripper.GetHashCode(); if (DisableModelPruning != false) hash ^= DisableModelPruning.GetHashCode(); - if (ScopedAllocatorOptimization != 0) hash ^= ScopedAllocatorOptimization.GetHashCode(); - if (PinToHostOptimization != 0) hash ^= PinToHostOptimization.GetHashCode(); + if (ScopedAllocatorOptimization != global::Tensorflow.RewriterConfig.Types.Toggle.Default) hash ^= ScopedAllocatorOptimization.GetHashCode(); + if (PinToHostOptimization != global::Tensorflow.RewriterConfig.Types.Toggle.Default) hash ^= PinToHostOptimization.GetHashCode(); + if (ImplementationSelector != global::Tensorflow.RewriterConfig.Types.Toggle.Default) hash ^= ImplementationSelector.GetHashCode(); + if (AutoMixedPrecision != global::Tensorflow.RewriterConfig.Types.Toggle.Default) hash ^= AutoMixedPrecision.GetHashCode(); if (DisableMetaOptimizer != false) hash ^= DisableMetaOptimizer.GetHashCode(); - if (MetaOptimizerIterations != 0) hash ^= MetaOptimizerIterations.GetHashCode(); + if (MetaOptimizerIterations != global::Tensorflow.RewriterConfig.Types.NumIterationsType.DefaultNumIters) hash ^= MetaOptimizerIterations.GetHashCode(); if (MinGraphNodes != 0) hash ^= MinGraphNodes.GetHashCode(); - if (MemoryOptimization != 0) hash ^= MemoryOptimization.GetHashCode(); + if (MemoryOptimization != global::Tensorflow.RewriterConfig.Types.MemOptType.DefaultMemOpt) hash ^= MemoryOptimization.GetHashCode(); if (MemoryOptimizerTargetNodeNameScope.Length != 0) hash ^= MemoryOptimizerTargetNodeNameScope.GetHashCode(); if (MetaOptimizerTimeoutMs != 0L) hash ^= MetaOptimizerTimeoutMs.GetHashCode(); if (autoParallel_ != null) hash ^= AutoParallel.GetHashCode(); @@ -844,6 +922,8 @@ namespace Tensorflow { if (scopedAllocatorOpts_ != null) hash ^= ScopedAllocatorOpts.GetHashCode(); hash ^= optimizers_.GetHashCode(); hash ^= customOptimizers_.GetHashCode(); + if (interOptimizerVerifierConfig_ != null) hash ^= InterOptimizerVerifierConfig.GetHashCode(); + if (postOptimizationVerifierConfig_ != null) hash ^= PostOptimizationVerifierConfig.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -857,7 +937,7 @@ namespace Tensorflow { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void WriteTo(pb::CodedOutputStream output) { - if (LayoutOptimizer != 0) { + if (LayoutOptimizer != global::Tensorflow.RewriterConfig.Types.Toggle.Default) { output.WriteRawTag(8); output.WriteEnum((int) LayoutOptimizer); } @@ -865,11 +945,11 @@ namespace Tensorflow { output.WriteRawTag(16); output.WriteBool(DisableModelPruning); } - if (ConstantFolding != 0) { + if (ConstantFolding != global::Tensorflow.RewriterConfig.Types.Toggle.Default) { output.WriteRawTag(24); output.WriteEnum((int) ConstantFolding); } - if (MemoryOptimization != 0) { + if (MemoryOptimization != global::Tensorflow.RewriterConfig.Types.MemOptType.DefaultMemOpt) { output.WriteRawTag(32); output.WriteEnum((int) MemoryOptimization); } @@ -881,39 +961,39 @@ namespace Tensorflow { output.WriteRawTag(50); output.WriteString(MemoryOptimizerTargetNodeNameScope); } - if (ArithmeticOptimization != 0) { + if (ArithmeticOptimization != global::Tensorflow.RewriterConfig.Types.Toggle.Default) { output.WriteRawTag(56); output.WriteEnum((int) ArithmeticOptimization); } - if (DependencyOptimization != 0) { + if (DependencyOptimization != global::Tensorflow.RewriterConfig.Types.Toggle.Default) { output.WriteRawTag(64); output.WriteEnum((int) DependencyOptimization); } - if (LoopOptimization != 0) { + if (LoopOptimization != global::Tensorflow.RewriterConfig.Types.Toggle.Default) { output.WriteRawTag(72); output.WriteEnum((int) LoopOptimization); } - if (FunctionOptimization != 0) { + if (FunctionOptimization != global::Tensorflow.RewriterConfig.Types.Toggle.Default) { output.WriteRawTag(80); output.WriteEnum((int) FunctionOptimization); } - if (DebugStripper != 0) { + if (DebugStripper != global::Tensorflow.RewriterConfig.Types.Toggle.Default) { output.WriteRawTag(88); output.WriteEnum((int) DebugStripper); } - if (MetaOptimizerIterations != 0) { + if (MetaOptimizerIterations != global::Tensorflow.RewriterConfig.Types.NumIterationsType.DefaultNumIters) { output.WriteRawTag(96); output.WriteEnum((int) MetaOptimizerIterations); } - if (ShapeOptimization != 0) { + if (ShapeOptimization != global::Tensorflow.RewriterConfig.Types.Toggle.Default) { output.WriteRawTag(104); output.WriteEnum((int) ShapeOptimization); } - if (Remapping != 0) { + if (Remapping != global::Tensorflow.RewriterConfig.Types.Toggle.Default) { output.WriteRawTag(112); output.WriteEnum((int) Remapping); } - if (ScopedAllocatorOptimization != 0) { + if (ScopedAllocatorOptimization != global::Tensorflow.RewriterConfig.Types.Toggle.Default) { output.WriteRawTag(120); output.WriteEnum((int) ScopedAllocatorOptimization); } @@ -925,7 +1005,7 @@ namespace Tensorflow { output.WriteRawTag(136, 1); output.WriteInt32(MinGraphNodes); } - if (PinToHostOptimization != 0) { + if (PinToHostOptimization != global::Tensorflow.RewriterConfig.Types.Toggle.Default) { output.WriteRawTag(144, 1); output.WriteEnum((int) PinToHostOptimization); } @@ -941,8 +1021,24 @@ namespace Tensorflow { output.WriteRawTag(168, 1); output.WriteBool(FailOnOptimizerErrors); } + if (ImplementationSelector != global::Tensorflow.RewriterConfig.Types.Toggle.Default) { + output.WriteRawTag(176, 1); + output.WriteEnum((int) ImplementationSelector); + } + if (AutoMixedPrecision != global::Tensorflow.RewriterConfig.Types.Toggle.Default) { + output.WriteRawTag(184, 1); + output.WriteEnum((int) AutoMixedPrecision); + } optimizers_.WriteTo(output, _repeated_optimizers_codec); customOptimizers_.WriteTo(output, _repeated_customOptimizers_codec); + if (interOptimizerVerifierConfig_ != null) { + output.WriteRawTag(226, 18); + output.WriteMessage(InterOptimizerVerifierConfig); + } + if (postOptimizationVerifierConfig_ != null) { + output.WriteRawTag(234, 18); + output.WriteMessage(PostOptimizationVerifierConfig); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -951,52 +1047,58 @@ namespace Tensorflow { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int CalculateSize() { int size = 0; - if (LayoutOptimizer != 0) { + if (LayoutOptimizer != global::Tensorflow.RewriterConfig.Types.Toggle.Default) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) LayoutOptimizer); } - if (ConstantFolding != 0) { + if (ConstantFolding != global::Tensorflow.RewriterConfig.Types.Toggle.Default) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ConstantFolding); } - if (ShapeOptimization != 0) { + if (ShapeOptimization != global::Tensorflow.RewriterConfig.Types.Toggle.Default) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ShapeOptimization); } - if (Remapping != 0) { + if (Remapping != global::Tensorflow.RewriterConfig.Types.Toggle.Default) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Remapping); } - if (ArithmeticOptimization != 0) { + if (ArithmeticOptimization != global::Tensorflow.RewriterConfig.Types.Toggle.Default) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ArithmeticOptimization); } - if (DependencyOptimization != 0) { + if (DependencyOptimization != global::Tensorflow.RewriterConfig.Types.Toggle.Default) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) DependencyOptimization); } - if (LoopOptimization != 0) { + if (LoopOptimization != global::Tensorflow.RewriterConfig.Types.Toggle.Default) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) LoopOptimization); } - if (FunctionOptimization != 0) { + if (FunctionOptimization != global::Tensorflow.RewriterConfig.Types.Toggle.Default) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) FunctionOptimization); } - if (DebugStripper != 0) { + if (DebugStripper != global::Tensorflow.RewriterConfig.Types.Toggle.Default) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) DebugStripper); } if (DisableModelPruning != false) { size += 1 + 1; } - if (ScopedAllocatorOptimization != 0) { + if (ScopedAllocatorOptimization != global::Tensorflow.RewriterConfig.Types.Toggle.Default) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ScopedAllocatorOptimization); } - if (PinToHostOptimization != 0) { + if (PinToHostOptimization != global::Tensorflow.RewriterConfig.Types.Toggle.Default) { size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) PinToHostOptimization); } + if (ImplementationSelector != global::Tensorflow.RewriterConfig.Types.Toggle.Default) { + size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) ImplementationSelector); + } + if (AutoMixedPrecision != global::Tensorflow.RewriterConfig.Types.Toggle.Default) { + size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) AutoMixedPrecision); + } if (DisableMetaOptimizer != false) { size += 2 + 1; } - if (MetaOptimizerIterations != 0) { + if (MetaOptimizerIterations != global::Tensorflow.RewriterConfig.Types.NumIterationsType.DefaultNumIters) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) MetaOptimizerIterations); } if (MinGraphNodes != 0) { size += 2 + pb::CodedOutputStream.ComputeInt32Size(MinGraphNodes); } - if (MemoryOptimization != 0) { + if (MemoryOptimization != global::Tensorflow.RewriterConfig.Types.MemOptType.DefaultMemOpt) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) MemoryOptimization); } if (MemoryOptimizerTargetNodeNameScope.Length != 0) { @@ -1016,6 +1118,12 @@ namespace Tensorflow { } size += optimizers_.CalculateSize(_repeated_optimizers_codec); size += customOptimizers_.CalculateSize(_repeated_customOptimizers_codec); + if (interOptimizerVerifierConfig_ != null) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(InterOptimizerVerifierConfig); + } + if (postOptimizationVerifierConfig_ != null) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(PostOptimizationVerifierConfig); + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -1027,52 +1135,58 @@ namespace Tensorflow { if (other == null) { return; } - if (other.LayoutOptimizer != 0) { + if (other.LayoutOptimizer != global::Tensorflow.RewriterConfig.Types.Toggle.Default) { LayoutOptimizer = other.LayoutOptimizer; } - if (other.ConstantFolding != 0) { + if (other.ConstantFolding != global::Tensorflow.RewriterConfig.Types.Toggle.Default) { ConstantFolding = other.ConstantFolding; } - if (other.ShapeOptimization != 0) { + if (other.ShapeOptimization != global::Tensorflow.RewriterConfig.Types.Toggle.Default) { ShapeOptimization = other.ShapeOptimization; } - if (other.Remapping != 0) { + if (other.Remapping != global::Tensorflow.RewriterConfig.Types.Toggle.Default) { Remapping = other.Remapping; } - if (other.ArithmeticOptimization != 0) { + if (other.ArithmeticOptimization != global::Tensorflow.RewriterConfig.Types.Toggle.Default) { ArithmeticOptimization = other.ArithmeticOptimization; } - if (other.DependencyOptimization != 0) { + if (other.DependencyOptimization != global::Tensorflow.RewriterConfig.Types.Toggle.Default) { DependencyOptimization = other.DependencyOptimization; } - if (other.LoopOptimization != 0) { + if (other.LoopOptimization != global::Tensorflow.RewriterConfig.Types.Toggle.Default) { LoopOptimization = other.LoopOptimization; } - if (other.FunctionOptimization != 0) { + if (other.FunctionOptimization != global::Tensorflow.RewriterConfig.Types.Toggle.Default) { FunctionOptimization = other.FunctionOptimization; } - if (other.DebugStripper != 0) { + if (other.DebugStripper != global::Tensorflow.RewriterConfig.Types.Toggle.Default) { DebugStripper = other.DebugStripper; } if (other.DisableModelPruning != false) { DisableModelPruning = other.DisableModelPruning; } - if (other.ScopedAllocatorOptimization != 0) { + if (other.ScopedAllocatorOptimization != global::Tensorflow.RewriterConfig.Types.Toggle.Default) { ScopedAllocatorOptimization = other.ScopedAllocatorOptimization; } - if (other.PinToHostOptimization != 0) { + if (other.PinToHostOptimization != global::Tensorflow.RewriterConfig.Types.Toggle.Default) { PinToHostOptimization = other.PinToHostOptimization; } + if (other.ImplementationSelector != global::Tensorflow.RewriterConfig.Types.Toggle.Default) { + ImplementationSelector = other.ImplementationSelector; + } + if (other.AutoMixedPrecision != global::Tensorflow.RewriterConfig.Types.Toggle.Default) { + AutoMixedPrecision = other.AutoMixedPrecision; + } if (other.DisableMetaOptimizer != false) { DisableMetaOptimizer = other.DisableMetaOptimizer; } - if (other.MetaOptimizerIterations != 0) { + if (other.MetaOptimizerIterations != global::Tensorflow.RewriterConfig.Types.NumIterationsType.DefaultNumIters) { MetaOptimizerIterations = other.MetaOptimizerIterations; } if (other.MinGraphNodes != 0) { MinGraphNodes = other.MinGraphNodes; } - if (other.MemoryOptimization != 0) { + if (other.MemoryOptimization != global::Tensorflow.RewriterConfig.Types.MemOptType.DefaultMemOpt) { MemoryOptimization = other.MemoryOptimization; } if (other.MemoryOptimizerTargetNodeNameScope.Length != 0) { @@ -1083,7 +1197,7 @@ namespace Tensorflow { } if (other.autoParallel_ != null) { if (autoParallel_ == null) { - autoParallel_ = new global::Tensorflow.AutoParallelOptions(); + AutoParallel = new global::Tensorflow.AutoParallelOptions(); } AutoParallel.MergeFrom(other.AutoParallel); } @@ -1092,12 +1206,24 @@ namespace Tensorflow { } if (other.scopedAllocatorOpts_ != null) { if (scopedAllocatorOpts_ == null) { - scopedAllocatorOpts_ = new global::Tensorflow.ScopedAllocatorOptions(); + ScopedAllocatorOpts = new global::Tensorflow.ScopedAllocatorOptions(); } ScopedAllocatorOpts.MergeFrom(other.ScopedAllocatorOpts); } optimizers_.Add(other.optimizers_); customOptimizers_.Add(other.customOptimizers_); + if (other.interOptimizerVerifierConfig_ != null) { + if (interOptimizerVerifierConfig_ == null) { + InterOptimizerVerifierConfig = new global::Tensorflow.VerifierConfig(); + } + InterOptimizerVerifierConfig.MergeFrom(other.InterOptimizerVerifierConfig); + } + if (other.postOptimizationVerifierConfig_ != null) { + if (postOptimizationVerifierConfig_ == null) { + PostOptimizationVerifierConfig = new global::Tensorflow.VerifierConfig(); + } + PostOptimizationVerifierConfig.MergeFrom(other.PostOptimizationVerifierConfig); + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -1110,7 +1236,7 @@ namespace Tensorflow { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { - layoutOptimizer_ = (global::Tensorflow.RewriterConfig.Types.Toggle) input.ReadEnum(); + LayoutOptimizer = (global::Tensorflow.RewriterConfig.Types.Toggle) input.ReadEnum(); break; } case 16: { @@ -1118,18 +1244,18 @@ namespace Tensorflow { break; } case 24: { - constantFolding_ = (global::Tensorflow.RewriterConfig.Types.Toggle) input.ReadEnum(); + ConstantFolding = (global::Tensorflow.RewriterConfig.Types.Toggle) input.ReadEnum(); break; } case 32: { - memoryOptimization_ = (global::Tensorflow.RewriterConfig.Types.MemOptType) input.ReadEnum(); + MemoryOptimization = (global::Tensorflow.RewriterConfig.Types.MemOptType) input.ReadEnum(); break; } case 42: { if (autoParallel_ == null) { - autoParallel_ = new global::Tensorflow.AutoParallelOptions(); + AutoParallel = new global::Tensorflow.AutoParallelOptions(); } - input.ReadMessage(autoParallel_); + input.ReadMessage(AutoParallel); break; } case 50: { @@ -1137,46 +1263,46 @@ namespace Tensorflow { break; } case 56: { - arithmeticOptimization_ = (global::Tensorflow.RewriterConfig.Types.Toggle) input.ReadEnum(); + ArithmeticOptimization = (global::Tensorflow.RewriterConfig.Types.Toggle) input.ReadEnum(); break; } case 64: { - dependencyOptimization_ = (global::Tensorflow.RewriterConfig.Types.Toggle) input.ReadEnum(); + DependencyOptimization = (global::Tensorflow.RewriterConfig.Types.Toggle) input.ReadEnum(); break; } case 72: { - loopOptimization_ = (global::Tensorflow.RewriterConfig.Types.Toggle) input.ReadEnum(); + LoopOptimization = (global::Tensorflow.RewriterConfig.Types.Toggle) input.ReadEnum(); break; } case 80: { - functionOptimization_ = (global::Tensorflow.RewriterConfig.Types.Toggle) input.ReadEnum(); + FunctionOptimization = (global::Tensorflow.RewriterConfig.Types.Toggle) input.ReadEnum(); break; } case 88: { - debugStripper_ = (global::Tensorflow.RewriterConfig.Types.Toggle) input.ReadEnum(); + DebugStripper = (global::Tensorflow.RewriterConfig.Types.Toggle) input.ReadEnum(); break; } case 96: { - metaOptimizerIterations_ = (global::Tensorflow.RewriterConfig.Types.NumIterationsType) input.ReadEnum(); + MetaOptimizerIterations = (global::Tensorflow.RewriterConfig.Types.NumIterationsType) input.ReadEnum(); break; } case 104: { - shapeOptimization_ = (global::Tensorflow.RewriterConfig.Types.Toggle) input.ReadEnum(); + ShapeOptimization = (global::Tensorflow.RewriterConfig.Types.Toggle) input.ReadEnum(); break; } case 112: { - remapping_ = (global::Tensorflow.RewriterConfig.Types.Toggle) input.ReadEnum(); + Remapping = (global::Tensorflow.RewriterConfig.Types.Toggle) input.ReadEnum(); break; } case 120: { - scopedAllocatorOptimization_ = (global::Tensorflow.RewriterConfig.Types.Toggle) input.ReadEnum(); + ScopedAllocatorOptimization = (global::Tensorflow.RewriterConfig.Types.Toggle) input.ReadEnum(); break; } case 130: { if (scopedAllocatorOpts_ == null) { - scopedAllocatorOpts_ = new global::Tensorflow.ScopedAllocatorOptions(); + ScopedAllocatorOpts = new global::Tensorflow.ScopedAllocatorOptions(); } - input.ReadMessage(scopedAllocatorOpts_); + input.ReadMessage(ScopedAllocatorOpts); break; } case 136: { @@ -1184,7 +1310,7 @@ namespace Tensorflow { break; } case 144: { - pinToHostOptimization_ = (global::Tensorflow.RewriterConfig.Types.Toggle) input.ReadEnum(); + PinToHostOptimization = (global::Tensorflow.RewriterConfig.Types.Toggle) input.ReadEnum(); break; } case 152: { @@ -1199,6 +1325,14 @@ namespace Tensorflow { FailOnOptimizerErrors = input.ReadBool(); break; } + case 176: { + ImplementationSelector = (global::Tensorflow.RewriterConfig.Types.Toggle) input.ReadEnum(); + break; + } + case 184: { + AutoMixedPrecision = (global::Tensorflow.RewriterConfig.Types.Toggle) input.ReadEnum(); + break; + } case 802: { optimizers_.AddEntriesFrom(input, _repeated_optimizers_codec); break; @@ -1207,6 +1341,20 @@ namespace Tensorflow { customOptimizers_.AddEntriesFrom(input, _repeated_customOptimizers_codec); break; } + case 2402: { + if (interOptimizerVerifierConfig_ == null) { + InterOptimizerVerifierConfig = new global::Tensorflow.VerifierConfig(); + } + input.ReadMessage(InterOptimizerVerifierConfig); + break; + } + case 2410: { + if (postOptimizationVerifierConfig_ == null) { + PostOptimizationVerifierConfig = new global::Tensorflow.VerifierConfig(); + } + input.ReadMessage(PostOptimizationVerifierConfig); + break; + } } } } @@ -1323,7 +1471,7 @@ namespace Tensorflow { /// Field number for the "parameter_map" field. public const int ParameterMapFieldNumber = 2; private static readonly pbc::MapField.Codec _map_parameterMap_codec - = new pbc::MapField.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForMessage(18, global::Tensorflow.AttrValue.Parser), 18); + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForMessage(18, global::Tensorflow.AttrValue.Parser), 18); private readonly pbc::MapField parameterMap_ = new pbc::MapField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public pbc::MapField ParameterMap { diff --git a/src/TensorFlowNET.Core/Protobuf/SavedObjectGraph.cs b/src/TensorFlowNET.Core/Protobuf/SavedObjectGraph.cs new file mode 100644 index 00000000..9150764b --- /dev/null +++ b/src/TensorFlowNET.Core/Protobuf/SavedObjectGraph.cs @@ -0,0 +1,2365 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/saved_object_graph.proto +// +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tensorflow { + + /// Holder for reflection information generated from tensorflow/core/protobuf/saved_object_graph.proto + public static partial class SavedObjectGraphReflection { + + #region Descriptor + /// File descriptor for tensorflow/core/protobuf/saved_object_graph.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static SavedObjectGraphReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CjF0ZW5zb3JmbG93L2NvcmUvcHJvdG9idWYvc2F2ZWRfb2JqZWN0X2dyYXBo", + "LnByb3RvEgp0ZW5zb3JmbG93GjV0ZW5zb3JmbG93L2NvcmUvcHJvdG9idWYv", + "dHJhY2thYmxlX29iamVjdF9ncmFwaC5wcm90bxoldGVuc29yZmxvdy9jb3Jl", + "L3Byb3RvYnVmL3N0cnVjdC5wcm90bxosdGVuc29yZmxvdy9jb3JlL2ZyYW1l", + "d29yay90ZW5zb3Jfc2hhcGUucHJvdG8aJXRlbnNvcmZsb3cvY29yZS9mcmFt", + "ZXdvcmsvdHlwZXMucHJvdG8aKHRlbnNvcmZsb3cvY29yZS9mcmFtZXdvcmsv", + "dmVyc2lvbnMucHJvdG8aKHRlbnNvcmZsb3cvY29yZS9mcmFtZXdvcmsvdmFy", + "aWFibGUucHJvdG8i6AEKEFNhdmVkT2JqZWN0R3JhcGgSJgoFbm9kZXMYASAD", + "KAsyFy50ZW5zb3JmbG93LlNhdmVkT2JqZWN0Ek8KEmNvbmNyZXRlX2Z1bmN0", + "aW9ucxgCIAMoCzIzLnRlbnNvcmZsb3cuU2F2ZWRPYmplY3RHcmFwaC5Db25j", + "cmV0ZUZ1bmN0aW9uc0VudHJ5GlsKFkNvbmNyZXRlRnVuY3Rpb25zRW50cnkS", + "CwoDa2V5GAEgASgJEjAKBXZhbHVlGAIgASgLMiEudGVuc29yZmxvdy5TYXZl", + "ZENvbmNyZXRlRnVuY3Rpb246AjgBIr0ECgtTYXZlZE9iamVjdBJSCghjaGls", + "ZHJlbhgBIAMoCzJALnRlbnNvcmZsb3cuVHJhY2thYmxlT2JqZWN0R3JhcGgu", + "VHJhY2thYmxlT2JqZWN0Lk9iamVjdFJlZmVyZW5jZRJeCg5zbG90X3Zhcmlh", + "YmxlcxgDIAMoCzJGLnRlbnNvcmZsb3cuVHJhY2thYmxlT2JqZWN0R3JhcGgu", + "VHJhY2thYmxlT2JqZWN0LlNsb3RWYXJpYWJsZVJlZmVyZW5jZRIyCgt1c2Vy", + "X29iamVjdBgEIAEoCzIbLnRlbnNvcmZsb3cuU2F2ZWRVc2VyT2JqZWN0SAAS", + "JwoFYXNzZXQYBSABKAsyFi50ZW5zb3JmbG93LlNhdmVkQXNzZXRIABItCghm", + "dW5jdGlvbhgGIAEoCzIZLnRlbnNvcmZsb3cuU2F2ZWRGdW5jdGlvbkgAEi0K", + "CHZhcmlhYmxlGAcgASgLMhkudGVuc29yZmxvdy5TYXZlZFZhcmlhYmxlSAAS", + "RwoWYmFyZV9jb25jcmV0ZV9mdW5jdGlvbhgIIAEoCzIlLnRlbnNvcmZsb3cu", + "U2F2ZWRCYXJlQ29uY3JldGVGdW5jdGlvbkgAEi0KCGNvbnN0YW50GAkgASgL", + "MhkudGVuc29yZmxvdy5TYXZlZENvbnN0YW50SAASLQoIcmVzb3VyY2UYCiAB", + "KAsyGS50ZW5zb3JmbG93LlNhdmVkUmVzb3VyY2VIAEIGCgRraW5kSgQIAhAD", + "UgphdHRyaWJ1dGVzImAKD1NhdmVkVXNlck9iamVjdBISCgppZGVudGlmaWVy", + "GAEgASgJEicKB3ZlcnNpb24YAiABKAsyFi50ZW5zb3JmbG93LlZlcnNpb25E", + "ZWYSEAoIbWV0YWRhdGEYAyABKAkiKgoKU2F2ZWRBc3NldBIcChRhc3NldF9m", + "aWxlX2RlZl9pbmRleBgBIAEoBSJcCg1TYXZlZEZ1bmN0aW9uEhoKEmNvbmNy", + "ZXRlX2Z1bmN0aW9ucxgBIAMoCRIvCg1mdW5jdGlvbl9zcGVjGAIgASgLMhgu", + "dGVuc29yZmxvdy5GdW5jdGlvblNwZWMiqAEKFVNhdmVkQ29uY3JldGVGdW5j", + "dGlvbhIUCgxib3VuZF9pbnB1dHMYAiADKAUSQgodY2Fub25pY2FsaXplZF9p", + "bnB1dF9zaWduYXR1cmUYAyABKAsyGy50ZW5zb3JmbG93LlN0cnVjdHVyZWRW", + "YWx1ZRI1ChBvdXRwdXRfc2lnbmF0dXJlGAQgASgLMhsudGVuc29yZmxvdy5T", + "dHJ1Y3R1cmVkVmFsdWUifAoZU2F2ZWRCYXJlQ29uY3JldGVGdW5jdGlvbhIe", + "ChZjb25jcmV0ZV9mdW5jdGlvbl9uYW1lGAEgASgJEhkKEWFyZ3VtZW50X2tl", + "eXdvcmRzGAIgAygJEiQKHGFsbG93ZWRfcG9zaXRpb25hbF9hcmd1bWVudHMY", + "AyABKAMiIgoNU2F2ZWRDb25zdGFudBIRCglvcGVyYXRpb24YASABKAki9gEK", + "DVNhdmVkVmFyaWFibGUSIwoFZHR5cGUYASABKA4yFC50ZW5zb3JmbG93LkRh", + "dGFUeXBlEisKBXNoYXBlGAIgASgLMhwudGVuc29yZmxvdy5UZW5zb3JTaGFw", + "ZVByb3RvEhEKCXRyYWluYWJsZRgDIAEoCBI8Cg9zeW5jaHJvbml6YXRpb24Y", + "BCABKA4yIy50ZW5zb3JmbG93LlZhcmlhYmxlU3luY2hyb25pemF0aW9uEjQK", + "C2FnZ3JlZ2F0aW9uGAUgASgOMh8udGVuc29yZmxvdy5WYXJpYWJsZUFnZ3Jl", + "Z2F0aW9uEgwKBG5hbWUYBiABKAkilQEKDEZ1bmN0aW9uU3BlYxIwCgtmdWxs", + "YXJnc3BlYxgBIAEoCzIbLnRlbnNvcmZsb3cuU3RydWN0dXJlZFZhbHVlEhEK", + "CWlzX21ldGhvZBgCIAEoCBI0Cg9pbnB1dF9zaWduYXR1cmUYBSABKAsyGy50", + "ZW5zb3JmbG93LlN0cnVjdHVyZWRWYWx1ZUoECAMQBEoECAQQBSIfCg1TYXZl", + "ZFJlc291cmNlEg4KBmRldmljZRgBIAEoCUID+AEBYgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Tensorflow.TrackableObjectGraphReflection.Descriptor, global::Tensorflow.StructReflection.Descriptor, global::Tensorflow.TensorShapeReflection.Descriptor, global::Tensorflow.TypesReflection.Descriptor, global::Tensorflow.VersionsReflection.Descriptor, global::Tensorflow.VariableReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.SavedObjectGraph), global::Tensorflow.SavedObjectGraph.Parser, new[]{ "Nodes", "ConcreteFunctions" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, }), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.SavedObject), global::Tensorflow.SavedObject.Parser, new[]{ "Children", "SlotVariables", "UserObject", "Asset", "Function", "Variable", "BareConcreteFunction", "Constant", "Resource" }, new[]{ "Kind" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.SavedUserObject), global::Tensorflow.SavedUserObject.Parser, new[]{ "Identifier", "Version", "Metadata" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.SavedAsset), global::Tensorflow.SavedAsset.Parser, new[]{ "AssetFileDefIndex" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.SavedFunction), global::Tensorflow.SavedFunction.Parser, new[]{ "ConcreteFunctions", "FunctionSpec" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.SavedConcreteFunction), global::Tensorflow.SavedConcreteFunction.Parser, new[]{ "BoundInputs", "CanonicalizedInputSignature", "OutputSignature" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.SavedBareConcreteFunction), global::Tensorflow.SavedBareConcreteFunction.Parser, new[]{ "ConcreteFunctionName", "ArgumentKeywords", "AllowedPositionalArguments" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.SavedConstant), global::Tensorflow.SavedConstant.Parser, new[]{ "Operation" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.SavedVariable), global::Tensorflow.SavedVariable.Parser, new[]{ "Dtype", "Shape", "Trainable", "Synchronization", "Aggregation", "Name" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.FunctionSpec), global::Tensorflow.FunctionSpec.Parser, new[]{ "Fullargspec", "IsMethod", "InputSignature" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.SavedResource), global::Tensorflow.SavedResource.Parser, new[]{ "Device" }, null, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class SavedObjectGraph : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SavedObjectGraph()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.SavedObjectGraphReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SavedObjectGraph() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SavedObjectGraph(SavedObjectGraph other) : this() { + nodes_ = other.nodes_.Clone(); + concreteFunctions_ = other.concreteFunctions_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SavedObjectGraph Clone() { + return new SavedObjectGraph(this); + } + + /// Field number for the "nodes" field. + public const int NodesFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_nodes_codec + = pb::FieldCodec.ForMessage(10, global::Tensorflow.SavedObject.Parser); + private readonly pbc::RepeatedField nodes_ = new pbc::RepeatedField(); + /// + /// Flattened list of objects in the object graph. + /// + /// The position of the object in this list indicates its id. + /// Nodes[0] is considered the root node. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField Nodes { + get { return nodes_; } + } + + /// Field number for the "concrete_functions" field. + public const int ConcreteFunctionsFieldNumber = 2; + private static readonly pbc::MapField.Codec _map_concreteFunctions_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForMessage(18, global::Tensorflow.SavedConcreteFunction.Parser), 18); + private readonly pbc::MapField concreteFunctions_ = new pbc::MapField(); + /// + /// Information about captures and output structures in concrete functions. + /// Referenced from SavedBareConcreteFunction and SavedFunction. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::MapField ConcreteFunctions { + get { return concreteFunctions_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as SavedObjectGraph); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(SavedObjectGraph other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!nodes_.Equals(other.nodes_)) return false; + if (!ConcreteFunctions.Equals(other.ConcreteFunctions)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + hash ^= nodes_.GetHashCode(); + hash ^= ConcreteFunctions.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + nodes_.WriteTo(output, _repeated_nodes_codec); + concreteFunctions_.WriteTo(output, _map_concreteFunctions_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + size += nodes_.CalculateSize(_repeated_nodes_codec); + size += concreteFunctions_.CalculateSize(_map_concreteFunctions_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(SavedObjectGraph other) { + if (other == null) { + return; + } + nodes_.Add(other.nodes_); + concreteFunctions_.Add(other.concreteFunctions_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + nodes_.AddEntriesFrom(input, _repeated_nodes_codec); + break; + } + case 18: { + concreteFunctions_.AddEntriesFrom(input, _map_concreteFunctions_codec); + break; + } + } + } + } + + } + + public sealed partial class SavedObject : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SavedObject()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.SavedObjectGraphReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SavedObject() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SavedObject(SavedObject other) : this() { + children_ = other.children_.Clone(); + slotVariables_ = other.slotVariables_.Clone(); + switch (other.KindCase) { + case KindOneofCase.UserObject: + UserObject = other.UserObject.Clone(); + break; + case KindOneofCase.Asset: + Asset = other.Asset.Clone(); + break; + case KindOneofCase.Function: + Function = other.Function.Clone(); + break; + case KindOneofCase.Variable: + Variable = other.Variable.Clone(); + break; + case KindOneofCase.BareConcreteFunction: + BareConcreteFunction = other.BareConcreteFunction.Clone(); + break; + case KindOneofCase.Constant: + Constant = other.Constant.Clone(); + break; + case KindOneofCase.Resource: + Resource = other.Resource.Clone(); + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SavedObject Clone() { + return new SavedObject(this); + } + + /// Field number for the "children" field. + public const int ChildrenFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_children_codec + = pb::FieldCodec.ForMessage(10, global::Tensorflow.TrackableObjectGraph.Types.TrackableObject.Types.ObjectReference.Parser); + private readonly pbc::RepeatedField children_ = new pbc::RepeatedField(); + /// + /// Objects which this object depends on: named edges in the dependency + /// graph. + /// + /// Note: currently only valid if kind == "user_object". + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField Children { + get { return children_; } + } + + /// Field number for the "slot_variables" field. + public const int SlotVariablesFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_slotVariables_codec + = pb::FieldCodec.ForMessage(26, global::Tensorflow.TrackableObjectGraph.Types.TrackableObject.Types.SlotVariableReference.Parser); + private readonly pbc::RepeatedField slotVariables_ = new pbc::RepeatedField(); + /// + /// Slot variables owned by this object. This describes the three-way + /// (optimizer, variable, slot variable) relationship; none of the three + /// depend on the others directly. + /// + /// Note: currently only valid if kind == "user_object". + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField SlotVariables { + get { return slotVariables_; } + } + + /// Field number for the "user_object" field. + public const int UserObjectFieldNumber = 4; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.SavedUserObject UserObject { + get { return kindCase_ == KindOneofCase.UserObject ? (global::Tensorflow.SavedUserObject) kind_ : null; } + set { + kind_ = value; + kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.UserObject; + } + } + + /// Field number for the "asset" field. + public const int AssetFieldNumber = 5; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.SavedAsset Asset { + get { return kindCase_ == KindOneofCase.Asset ? (global::Tensorflow.SavedAsset) kind_ : null; } + set { + kind_ = value; + kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.Asset; + } + } + + /// Field number for the "function" field. + public const int FunctionFieldNumber = 6; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.SavedFunction Function { + get { return kindCase_ == KindOneofCase.Function ? (global::Tensorflow.SavedFunction) kind_ : null; } + set { + kind_ = value; + kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.Function; + } + } + + /// Field number for the "variable" field. + public const int VariableFieldNumber = 7; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.SavedVariable Variable { + get { return kindCase_ == KindOneofCase.Variable ? (global::Tensorflow.SavedVariable) kind_ : null; } + set { + kind_ = value; + kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.Variable; + } + } + + /// Field number for the "bare_concrete_function" field. + public const int BareConcreteFunctionFieldNumber = 8; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.SavedBareConcreteFunction BareConcreteFunction { + get { return kindCase_ == KindOneofCase.BareConcreteFunction ? (global::Tensorflow.SavedBareConcreteFunction) kind_ : null; } + set { + kind_ = value; + kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.BareConcreteFunction; + } + } + + /// Field number for the "constant" field. + public const int ConstantFieldNumber = 9; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.SavedConstant Constant { + get { return kindCase_ == KindOneofCase.Constant ? (global::Tensorflow.SavedConstant) kind_ : null; } + set { + kind_ = value; + kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.Constant; + } + } + + /// Field number for the "resource" field. + public const int ResourceFieldNumber = 10; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.SavedResource Resource { + get { return kindCase_ == KindOneofCase.Resource ? (global::Tensorflow.SavedResource) kind_ : null; } + set { + kind_ = value; + kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.Resource; + } + } + + private object kind_; + /// Enum of possible cases for the "kind" oneof. + public enum KindOneofCase { + None = 0, + UserObject = 4, + Asset = 5, + Function = 6, + Variable = 7, + BareConcreteFunction = 8, + Constant = 9, + Resource = 10, + } + private KindOneofCase kindCase_ = KindOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public KindOneofCase KindCase { + get { return kindCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearKind() { + kindCase_ = KindOneofCase.None; + kind_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as SavedObject); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(SavedObject other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!children_.Equals(other.children_)) return false; + if(!slotVariables_.Equals(other.slotVariables_)) return false; + if (!object.Equals(UserObject, other.UserObject)) return false; + if (!object.Equals(Asset, other.Asset)) return false; + if (!object.Equals(Function, other.Function)) return false; + if (!object.Equals(Variable, other.Variable)) return false; + if (!object.Equals(BareConcreteFunction, other.BareConcreteFunction)) return false; + if (!object.Equals(Constant, other.Constant)) return false; + if (!object.Equals(Resource, other.Resource)) return false; + if (KindCase != other.KindCase) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + hash ^= children_.GetHashCode(); + hash ^= slotVariables_.GetHashCode(); + if (kindCase_ == KindOneofCase.UserObject) hash ^= UserObject.GetHashCode(); + if (kindCase_ == KindOneofCase.Asset) hash ^= Asset.GetHashCode(); + if (kindCase_ == KindOneofCase.Function) hash ^= Function.GetHashCode(); + if (kindCase_ == KindOneofCase.Variable) hash ^= Variable.GetHashCode(); + if (kindCase_ == KindOneofCase.BareConcreteFunction) hash ^= BareConcreteFunction.GetHashCode(); + if (kindCase_ == KindOneofCase.Constant) hash ^= Constant.GetHashCode(); + if (kindCase_ == KindOneofCase.Resource) hash ^= Resource.GetHashCode(); + hash ^= (int) kindCase_; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + children_.WriteTo(output, _repeated_children_codec); + slotVariables_.WriteTo(output, _repeated_slotVariables_codec); + if (kindCase_ == KindOneofCase.UserObject) { + output.WriteRawTag(34); + output.WriteMessage(UserObject); + } + if (kindCase_ == KindOneofCase.Asset) { + output.WriteRawTag(42); + output.WriteMessage(Asset); + } + if (kindCase_ == KindOneofCase.Function) { + output.WriteRawTag(50); + output.WriteMessage(Function); + } + if (kindCase_ == KindOneofCase.Variable) { + output.WriteRawTag(58); + output.WriteMessage(Variable); + } + if (kindCase_ == KindOneofCase.BareConcreteFunction) { + output.WriteRawTag(66); + output.WriteMessage(BareConcreteFunction); + } + if (kindCase_ == KindOneofCase.Constant) { + output.WriteRawTag(74); + output.WriteMessage(Constant); + } + if (kindCase_ == KindOneofCase.Resource) { + output.WriteRawTag(82); + output.WriteMessage(Resource); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + size += children_.CalculateSize(_repeated_children_codec); + size += slotVariables_.CalculateSize(_repeated_slotVariables_codec); + if (kindCase_ == KindOneofCase.UserObject) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(UserObject); + } + if (kindCase_ == KindOneofCase.Asset) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Asset); + } + if (kindCase_ == KindOneofCase.Function) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Function); + } + if (kindCase_ == KindOneofCase.Variable) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Variable); + } + if (kindCase_ == KindOneofCase.BareConcreteFunction) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(BareConcreteFunction); + } + if (kindCase_ == KindOneofCase.Constant) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Constant); + } + if (kindCase_ == KindOneofCase.Resource) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Resource); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(SavedObject other) { + if (other == null) { + return; + } + children_.Add(other.children_); + slotVariables_.Add(other.slotVariables_); + switch (other.KindCase) { + case KindOneofCase.UserObject: + if (UserObject == null) { + UserObject = new global::Tensorflow.SavedUserObject(); + } + UserObject.MergeFrom(other.UserObject); + break; + case KindOneofCase.Asset: + if (Asset == null) { + Asset = new global::Tensorflow.SavedAsset(); + } + Asset.MergeFrom(other.Asset); + break; + case KindOneofCase.Function: + if (Function == null) { + Function = new global::Tensorflow.SavedFunction(); + } + Function.MergeFrom(other.Function); + break; + case KindOneofCase.Variable: + if (Variable == null) { + Variable = new global::Tensorflow.SavedVariable(); + } + Variable.MergeFrom(other.Variable); + break; + case KindOneofCase.BareConcreteFunction: + if (BareConcreteFunction == null) { + BareConcreteFunction = new global::Tensorflow.SavedBareConcreteFunction(); + } + BareConcreteFunction.MergeFrom(other.BareConcreteFunction); + break; + case KindOneofCase.Constant: + if (Constant == null) { + Constant = new global::Tensorflow.SavedConstant(); + } + Constant.MergeFrom(other.Constant); + break; + case KindOneofCase.Resource: + if (Resource == null) { + Resource = new global::Tensorflow.SavedResource(); + } + Resource.MergeFrom(other.Resource); + break; + } + + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + children_.AddEntriesFrom(input, _repeated_children_codec); + break; + } + case 26: { + slotVariables_.AddEntriesFrom(input, _repeated_slotVariables_codec); + break; + } + case 34: { + global::Tensorflow.SavedUserObject subBuilder = new global::Tensorflow.SavedUserObject(); + if (kindCase_ == KindOneofCase.UserObject) { + subBuilder.MergeFrom(UserObject); + } + input.ReadMessage(subBuilder); + UserObject = subBuilder; + break; + } + case 42: { + global::Tensorflow.SavedAsset subBuilder = new global::Tensorflow.SavedAsset(); + if (kindCase_ == KindOneofCase.Asset) { + subBuilder.MergeFrom(Asset); + } + input.ReadMessage(subBuilder); + Asset = subBuilder; + break; + } + case 50: { + global::Tensorflow.SavedFunction subBuilder = new global::Tensorflow.SavedFunction(); + if (kindCase_ == KindOneofCase.Function) { + subBuilder.MergeFrom(Function); + } + input.ReadMessage(subBuilder); + Function = subBuilder; + break; + } + case 58: { + global::Tensorflow.SavedVariable subBuilder = new global::Tensorflow.SavedVariable(); + if (kindCase_ == KindOneofCase.Variable) { + subBuilder.MergeFrom(Variable); + } + input.ReadMessage(subBuilder); + Variable = subBuilder; + break; + } + case 66: { + global::Tensorflow.SavedBareConcreteFunction subBuilder = new global::Tensorflow.SavedBareConcreteFunction(); + if (kindCase_ == KindOneofCase.BareConcreteFunction) { + subBuilder.MergeFrom(BareConcreteFunction); + } + input.ReadMessage(subBuilder); + BareConcreteFunction = subBuilder; + break; + } + case 74: { + global::Tensorflow.SavedConstant subBuilder = new global::Tensorflow.SavedConstant(); + if (kindCase_ == KindOneofCase.Constant) { + subBuilder.MergeFrom(Constant); + } + input.ReadMessage(subBuilder); + Constant = subBuilder; + break; + } + case 82: { + global::Tensorflow.SavedResource subBuilder = new global::Tensorflow.SavedResource(); + if (kindCase_ == KindOneofCase.Resource) { + subBuilder.MergeFrom(Resource); + } + input.ReadMessage(subBuilder); + Resource = subBuilder; + break; + } + } + } + } + + } + + /// + /// A SavedUserObject is an object (in the object-oriented language of the + /// TensorFlow program) of some user- or framework-defined class other than + /// those handled specifically by the other kinds of SavedObjects. + /// + /// This object cannot be evaluated as a tensor, and therefore cannot be bound + /// to an input of a function. + /// + public sealed partial class SavedUserObject : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SavedUserObject()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.SavedObjectGraphReflection.Descriptor.MessageTypes[2]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SavedUserObject() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SavedUserObject(SavedUserObject other) : this() { + identifier_ = other.identifier_; + version_ = other.version_ != null ? other.version_.Clone() : null; + metadata_ = other.metadata_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SavedUserObject Clone() { + return new SavedUserObject(this); + } + + /// Field number for the "identifier" field. + public const int IdentifierFieldNumber = 1; + private string identifier_ = ""; + /// + /// Corresponds to a registration of the type to use in the loading program. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string Identifier { + get { return identifier_; } + set { + identifier_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "version" field. + public const int VersionFieldNumber = 2; + private global::Tensorflow.VersionDef version_; + /// + /// Version information from the producer of this SavedUserObject. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.VersionDef Version { + get { return version_; } + set { + version_ = value; + } + } + + /// Field number for the "metadata" field. + public const int MetadataFieldNumber = 3; + private string metadata_ = ""; + /// + /// Initialization-related metadata. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string Metadata { + get { return metadata_; } + set { + metadata_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as SavedUserObject); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(SavedUserObject other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Identifier != other.Identifier) return false; + if (!object.Equals(Version, other.Version)) return false; + if (Metadata != other.Metadata) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Identifier.Length != 0) hash ^= Identifier.GetHashCode(); + if (version_ != null) hash ^= Version.GetHashCode(); + if (Metadata.Length != 0) hash ^= Metadata.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (Identifier.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Identifier); + } + if (version_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Version); + } + if (Metadata.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Metadata); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Identifier.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Identifier); + } + if (version_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Version); + } + if (Metadata.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Metadata); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(SavedUserObject other) { + if (other == null) { + return; + } + if (other.Identifier.Length != 0) { + Identifier = other.Identifier; + } + if (other.version_ != null) { + if (version_ == null) { + Version = new global::Tensorflow.VersionDef(); + } + Version.MergeFrom(other.Version); + } + if (other.Metadata.Length != 0) { + Metadata = other.Metadata; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Identifier = input.ReadString(); + break; + } + case 18: { + if (version_ == null) { + Version = new global::Tensorflow.VersionDef(); + } + input.ReadMessage(Version); + break; + } + case 26: { + Metadata = input.ReadString(); + break; + } + } + } + } + + } + + /// + /// A SavedAsset points to an asset in the MetaGraph. + /// + /// When bound to a function this object evaluates to a tensor with the absolute + /// filename. Users should not depend on a particular part of the filename to + /// remain stable (e.g. basename could be changed). + /// + public sealed partial class SavedAsset : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SavedAsset()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.SavedObjectGraphReflection.Descriptor.MessageTypes[3]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SavedAsset() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SavedAsset(SavedAsset other) : this() { + assetFileDefIndex_ = other.assetFileDefIndex_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SavedAsset Clone() { + return new SavedAsset(this); + } + + /// Field number for the "asset_file_def_index" field. + public const int AssetFileDefIndexFieldNumber = 1; + private int assetFileDefIndex_; + /// + /// Index into `MetaGraphDef.asset_file_def[]` that describes the Asset. + /// + /// Only the field `AssetFileDef.filename` is used. Other fields, such as + /// `AssetFileDef.tensor_info`, MUST be ignored. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int AssetFileDefIndex { + get { return assetFileDefIndex_; } + set { + assetFileDefIndex_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as SavedAsset); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(SavedAsset other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (AssetFileDefIndex != other.AssetFileDefIndex) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (AssetFileDefIndex != 0) hash ^= AssetFileDefIndex.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (AssetFileDefIndex != 0) { + output.WriteRawTag(8); + output.WriteInt32(AssetFileDefIndex); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (AssetFileDefIndex != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(AssetFileDefIndex); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(SavedAsset other) { + if (other == null) { + return; + } + if (other.AssetFileDefIndex != 0) { + AssetFileDefIndex = other.AssetFileDefIndex; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + AssetFileDefIndex = input.ReadInt32(); + break; + } + } + } + } + + } + + /// + /// A function with multiple signatures, possibly with non-Tensor arguments. + /// + public sealed partial class SavedFunction : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SavedFunction()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.SavedObjectGraphReflection.Descriptor.MessageTypes[4]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SavedFunction() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SavedFunction(SavedFunction other) : this() { + concreteFunctions_ = other.concreteFunctions_.Clone(); + functionSpec_ = other.functionSpec_ != null ? other.functionSpec_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SavedFunction Clone() { + return new SavedFunction(this); + } + + /// Field number for the "concrete_functions" field. + public const int ConcreteFunctionsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_concreteFunctions_codec + = pb::FieldCodec.ForString(10); + private readonly pbc::RepeatedField concreteFunctions_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField ConcreteFunctions { + get { return concreteFunctions_; } + } + + /// Field number for the "function_spec" field. + public const int FunctionSpecFieldNumber = 2; + private global::Tensorflow.FunctionSpec functionSpec_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.FunctionSpec FunctionSpec { + get { return functionSpec_; } + set { + functionSpec_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as SavedFunction); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(SavedFunction other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!concreteFunctions_.Equals(other.concreteFunctions_)) return false; + if (!object.Equals(FunctionSpec, other.FunctionSpec)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + hash ^= concreteFunctions_.GetHashCode(); + if (functionSpec_ != null) hash ^= FunctionSpec.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + concreteFunctions_.WriteTo(output, _repeated_concreteFunctions_codec); + if (functionSpec_ != null) { + output.WriteRawTag(18); + output.WriteMessage(FunctionSpec); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + size += concreteFunctions_.CalculateSize(_repeated_concreteFunctions_codec); + if (functionSpec_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(FunctionSpec); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(SavedFunction other) { + if (other == null) { + return; + } + concreteFunctions_.Add(other.concreteFunctions_); + if (other.functionSpec_ != null) { + if (functionSpec_ == null) { + FunctionSpec = new global::Tensorflow.FunctionSpec(); + } + FunctionSpec.MergeFrom(other.FunctionSpec); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + concreteFunctions_.AddEntriesFrom(input, _repeated_concreteFunctions_codec); + break; + } + case 18: { + if (functionSpec_ == null) { + FunctionSpec = new global::Tensorflow.FunctionSpec(); + } + input.ReadMessage(FunctionSpec); + break; + } + } + } + } + + } + + /// + /// Stores low-level information about a concrete function. Referenced in either + /// a SavedFunction or a SavedBareConcreteFunction. + /// + public sealed partial class SavedConcreteFunction : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SavedConcreteFunction()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.SavedObjectGraphReflection.Descriptor.MessageTypes[5]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SavedConcreteFunction() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SavedConcreteFunction(SavedConcreteFunction other) : this() { + boundInputs_ = other.boundInputs_.Clone(); + canonicalizedInputSignature_ = other.canonicalizedInputSignature_ != null ? other.canonicalizedInputSignature_.Clone() : null; + outputSignature_ = other.outputSignature_ != null ? other.outputSignature_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SavedConcreteFunction Clone() { + return new SavedConcreteFunction(this); + } + + /// Field number for the "bound_inputs" field. + public const int BoundInputsFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_boundInputs_codec + = pb::FieldCodec.ForInt32(18); + private readonly pbc::RepeatedField boundInputs_ = new pbc::RepeatedField(); + /// + /// Bound inputs to the function. The SavedObjects identified by the node ids + /// given here are appended as extra inputs to the caller-supplied inputs. + /// The only types of SavedObjects valid here are SavedVariable, SavedResource + /// and SavedAsset. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField BoundInputs { + get { return boundInputs_; } + } + + /// Field number for the "canonicalized_input_signature" field. + public const int CanonicalizedInputSignatureFieldNumber = 3; + private global::Tensorflow.StructuredValue canonicalizedInputSignature_; + /// + /// Input in canonicalized form that was received to create this concrete + /// function. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.StructuredValue CanonicalizedInputSignature { + get { return canonicalizedInputSignature_; } + set { + canonicalizedInputSignature_ = value; + } + } + + /// Field number for the "output_signature" field. + public const int OutputSignatureFieldNumber = 4; + private global::Tensorflow.StructuredValue outputSignature_; + /// + /// Output that was the return value of this function after replacing all + /// Tensors with TensorSpecs. This can be an arbitrary nested function and will + /// be used to reconstruct the full structure from pure tensors. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.StructuredValue OutputSignature { + get { return outputSignature_; } + set { + outputSignature_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as SavedConcreteFunction); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(SavedConcreteFunction other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!boundInputs_.Equals(other.boundInputs_)) return false; + if (!object.Equals(CanonicalizedInputSignature, other.CanonicalizedInputSignature)) return false; + if (!object.Equals(OutputSignature, other.OutputSignature)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + hash ^= boundInputs_.GetHashCode(); + if (canonicalizedInputSignature_ != null) hash ^= CanonicalizedInputSignature.GetHashCode(); + if (outputSignature_ != null) hash ^= OutputSignature.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + boundInputs_.WriteTo(output, _repeated_boundInputs_codec); + if (canonicalizedInputSignature_ != null) { + output.WriteRawTag(26); + output.WriteMessage(CanonicalizedInputSignature); + } + if (outputSignature_ != null) { + output.WriteRawTag(34); + output.WriteMessage(OutputSignature); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + size += boundInputs_.CalculateSize(_repeated_boundInputs_codec); + if (canonicalizedInputSignature_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(CanonicalizedInputSignature); + } + if (outputSignature_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(OutputSignature); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(SavedConcreteFunction other) { + if (other == null) { + return; + } + boundInputs_.Add(other.boundInputs_); + if (other.canonicalizedInputSignature_ != null) { + if (canonicalizedInputSignature_ == null) { + CanonicalizedInputSignature = new global::Tensorflow.StructuredValue(); + } + CanonicalizedInputSignature.MergeFrom(other.CanonicalizedInputSignature); + } + if (other.outputSignature_ != null) { + if (outputSignature_ == null) { + OutputSignature = new global::Tensorflow.StructuredValue(); + } + OutputSignature.MergeFrom(other.OutputSignature); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 18: + case 16: { + boundInputs_.AddEntriesFrom(input, _repeated_boundInputs_codec); + break; + } + case 26: { + if (canonicalizedInputSignature_ == null) { + CanonicalizedInputSignature = new global::Tensorflow.StructuredValue(); + } + input.ReadMessage(CanonicalizedInputSignature); + break; + } + case 34: { + if (outputSignature_ == null) { + OutputSignature = new global::Tensorflow.StructuredValue(); + } + input.ReadMessage(OutputSignature); + break; + } + } + } + } + + } + + public sealed partial class SavedBareConcreteFunction : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SavedBareConcreteFunction()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.SavedObjectGraphReflection.Descriptor.MessageTypes[6]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SavedBareConcreteFunction() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SavedBareConcreteFunction(SavedBareConcreteFunction other) : this() { + concreteFunctionName_ = other.concreteFunctionName_; + argumentKeywords_ = other.argumentKeywords_.Clone(); + allowedPositionalArguments_ = other.allowedPositionalArguments_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SavedBareConcreteFunction Clone() { + return new SavedBareConcreteFunction(this); + } + + /// Field number for the "concrete_function_name" field. + public const int ConcreteFunctionNameFieldNumber = 1; + private string concreteFunctionName_ = ""; + /// + /// Identifies a SavedConcreteFunction. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string ConcreteFunctionName { + get { return concreteFunctionName_; } + set { + concreteFunctionName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "argument_keywords" field. + public const int ArgumentKeywordsFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_argumentKeywords_codec + = pb::FieldCodec.ForString(18); + private readonly pbc::RepeatedField argumentKeywords_ = new pbc::RepeatedField(); + /// + /// A sequence of unique strings, one per Tensor argument. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField ArgumentKeywords { + get { return argumentKeywords_; } + } + + /// Field number for the "allowed_positional_arguments" field. + public const int AllowedPositionalArgumentsFieldNumber = 3; + private long allowedPositionalArguments_; + /// + /// The prefix of `argument_keywords` which may be identified by position. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public long AllowedPositionalArguments { + get { return allowedPositionalArguments_; } + set { + allowedPositionalArguments_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as SavedBareConcreteFunction); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(SavedBareConcreteFunction other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (ConcreteFunctionName != other.ConcreteFunctionName) return false; + if(!argumentKeywords_.Equals(other.argumentKeywords_)) return false; + if (AllowedPositionalArguments != other.AllowedPositionalArguments) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (ConcreteFunctionName.Length != 0) hash ^= ConcreteFunctionName.GetHashCode(); + hash ^= argumentKeywords_.GetHashCode(); + if (AllowedPositionalArguments != 0L) hash ^= AllowedPositionalArguments.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (ConcreteFunctionName.Length != 0) { + output.WriteRawTag(10); + output.WriteString(ConcreteFunctionName); + } + argumentKeywords_.WriteTo(output, _repeated_argumentKeywords_codec); + if (AllowedPositionalArguments != 0L) { + output.WriteRawTag(24); + output.WriteInt64(AllowedPositionalArguments); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (ConcreteFunctionName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ConcreteFunctionName); + } + size += argumentKeywords_.CalculateSize(_repeated_argumentKeywords_codec); + if (AllowedPositionalArguments != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(AllowedPositionalArguments); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(SavedBareConcreteFunction other) { + if (other == null) { + return; + } + if (other.ConcreteFunctionName.Length != 0) { + ConcreteFunctionName = other.ConcreteFunctionName; + } + argumentKeywords_.Add(other.argumentKeywords_); + if (other.AllowedPositionalArguments != 0L) { + AllowedPositionalArguments = other.AllowedPositionalArguments; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + ConcreteFunctionName = input.ReadString(); + break; + } + case 18: { + argumentKeywords_.AddEntriesFrom(input, _repeated_argumentKeywords_codec); + break; + } + case 24: { + AllowedPositionalArguments = input.ReadInt64(); + break; + } + } + } + } + + } + + public sealed partial class SavedConstant : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SavedConstant()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.SavedObjectGraphReflection.Descriptor.MessageTypes[7]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SavedConstant() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SavedConstant(SavedConstant other) : this() { + operation_ = other.operation_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SavedConstant Clone() { + return new SavedConstant(this); + } + + /// Field number for the "operation" field. + public const int OperationFieldNumber = 1; + private string operation_ = ""; + /// + /// An Operation name for a ConstantOp in this SavedObjectGraph's MetaGraph. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string Operation { + get { return operation_; } + set { + operation_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as SavedConstant); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(SavedConstant other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Operation != other.Operation) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Operation.Length != 0) hash ^= Operation.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (Operation.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Operation); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Operation.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Operation); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(SavedConstant other) { + if (other == null) { + return; + } + if (other.Operation.Length != 0) { + Operation = other.Operation; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Operation = input.ReadString(); + break; + } + } + } + } + + } + + /// + /// Represents a Variable that is initialized by loading the contents from the + /// checkpoint. + /// + public sealed partial class SavedVariable : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SavedVariable()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.SavedObjectGraphReflection.Descriptor.MessageTypes[8]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SavedVariable() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SavedVariable(SavedVariable other) : this() { + dtype_ = other.dtype_; + shape_ = other.shape_ != null ? other.shape_.Clone() : null; + trainable_ = other.trainable_; + synchronization_ = other.synchronization_; + aggregation_ = other.aggregation_; + name_ = other.name_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SavedVariable Clone() { + return new SavedVariable(this); + } + + /// Field number for the "dtype" field. + public const int DtypeFieldNumber = 1; + private global::Tensorflow.DataType dtype_ = global::Tensorflow.DataType.DtInvalid; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.DataType Dtype { + get { return dtype_; } + set { + dtype_ = value; + } + } + + /// Field number for the "shape" field. + public const int ShapeFieldNumber = 2; + private global::Tensorflow.TensorShapeProto shape_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.TensorShapeProto Shape { + get { return shape_; } + set { + shape_ = value; + } + } + + /// Field number for the "trainable" field. + public const int TrainableFieldNumber = 3; + private bool trainable_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Trainable { + get { return trainable_; } + set { + trainable_ = value; + } + } + + /// Field number for the "synchronization" field. + public const int SynchronizationFieldNumber = 4; + private global::Tensorflow.VariableSynchronization synchronization_ = global::Tensorflow.VariableSynchronization.Auto; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.VariableSynchronization Synchronization { + get { return synchronization_; } + set { + synchronization_ = value; + } + } + + /// Field number for the "aggregation" field. + public const int AggregationFieldNumber = 5; + private global::Tensorflow.VariableAggregation aggregation_ = global::Tensorflow.VariableAggregation.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.VariableAggregation Aggregation { + get { return aggregation_; } + set { + aggregation_ = value; + } + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 6; + private string name_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as SavedVariable); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(SavedVariable other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Dtype != other.Dtype) return false; + if (!object.Equals(Shape, other.Shape)) return false; + if (Trainable != other.Trainable) return false; + if (Synchronization != other.Synchronization) return false; + if (Aggregation != other.Aggregation) return false; + if (Name != other.Name) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Dtype != global::Tensorflow.DataType.DtInvalid) hash ^= Dtype.GetHashCode(); + if (shape_ != null) hash ^= Shape.GetHashCode(); + if (Trainable != false) hash ^= Trainable.GetHashCode(); + if (Synchronization != global::Tensorflow.VariableSynchronization.Auto) hash ^= Synchronization.GetHashCode(); + if (Aggregation != global::Tensorflow.VariableAggregation.None) hash ^= Aggregation.GetHashCode(); + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (Dtype != global::Tensorflow.DataType.DtInvalid) { + output.WriteRawTag(8); + output.WriteEnum((int) Dtype); + } + if (shape_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Shape); + } + if (Trainable != false) { + output.WriteRawTag(24); + output.WriteBool(Trainable); + } + if (Synchronization != global::Tensorflow.VariableSynchronization.Auto) { + output.WriteRawTag(32); + output.WriteEnum((int) Synchronization); + } + if (Aggregation != global::Tensorflow.VariableAggregation.None) { + output.WriteRawTag(40); + output.WriteEnum((int) Aggregation); + } + if (Name.Length != 0) { + output.WriteRawTag(50); + output.WriteString(Name); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Dtype != global::Tensorflow.DataType.DtInvalid) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Dtype); + } + if (shape_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Shape); + } + if (Trainable != false) { + size += 1 + 1; + } + if (Synchronization != global::Tensorflow.VariableSynchronization.Auto) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Synchronization); + } + if (Aggregation != global::Tensorflow.VariableAggregation.None) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Aggregation); + } + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(SavedVariable other) { + if (other == null) { + return; + } + if (other.Dtype != global::Tensorflow.DataType.DtInvalid) { + Dtype = other.Dtype; + } + if (other.shape_ != null) { + if (shape_ == null) { + Shape = new global::Tensorflow.TensorShapeProto(); + } + Shape.MergeFrom(other.Shape); + } + if (other.Trainable != false) { + Trainable = other.Trainable; + } + if (other.Synchronization != global::Tensorflow.VariableSynchronization.Auto) { + Synchronization = other.Synchronization; + } + if (other.Aggregation != global::Tensorflow.VariableAggregation.None) { + Aggregation = other.Aggregation; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Dtype = (global::Tensorflow.DataType) input.ReadEnum(); + break; + } + case 18: { + if (shape_ == null) { + Shape = new global::Tensorflow.TensorShapeProto(); + } + input.ReadMessage(Shape); + break; + } + case 24: { + Trainable = input.ReadBool(); + break; + } + case 32: { + Synchronization = (global::Tensorflow.VariableSynchronization) input.ReadEnum(); + break; + } + case 40: { + Aggregation = (global::Tensorflow.VariableAggregation) input.ReadEnum(); + break; + } + case 50: { + Name = input.ReadString(); + break; + } + } + } + } + + } + + /// + /// Represents `FunctionSpec` used in `Function`. This represents a + /// function that has been wrapped as a TensorFlow `Function`. + /// + public sealed partial class FunctionSpec : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FunctionSpec()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.SavedObjectGraphReflection.Descriptor.MessageTypes[9]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public FunctionSpec() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public FunctionSpec(FunctionSpec other) : this() { + fullargspec_ = other.fullargspec_ != null ? other.fullargspec_.Clone() : null; + isMethod_ = other.isMethod_; + inputSignature_ = other.inputSignature_ != null ? other.inputSignature_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public FunctionSpec Clone() { + return new FunctionSpec(this); + } + + /// Field number for the "fullargspec" field. + public const int FullargspecFieldNumber = 1; + private global::Tensorflow.StructuredValue fullargspec_; + /// + /// Full arg spec from inspect.getfullargspec(). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.StructuredValue Fullargspec { + get { return fullargspec_; } + set { + fullargspec_ = value; + } + } + + /// Field number for the "is_method" field. + public const int IsMethodFieldNumber = 2; + private bool isMethod_; + /// + /// Whether this represents a class method. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool IsMethod { + get { return isMethod_; } + set { + isMethod_ = value; + } + } + + /// Field number for the "input_signature" field. + public const int InputSignatureFieldNumber = 5; + private global::Tensorflow.StructuredValue inputSignature_; + /// + /// The input signature, if specified. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.StructuredValue InputSignature { + get { return inputSignature_; } + set { + inputSignature_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as FunctionSpec); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(FunctionSpec other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(Fullargspec, other.Fullargspec)) return false; + if (IsMethod != other.IsMethod) return false; + if (!object.Equals(InputSignature, other.InputSignature)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (fullargspec_ != null) hash ^= Fullargspec.GetHashCode(); + if (IsMethod != false) hash ^= IsMethod.GetHashCode(); + if (inputSignature_ != null) hash ^= InputSignature.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (fullargspec_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Fullargspec); + } + if (IsMethod != false) { + output.WriteRawTag(16); + output.WriteBool(IsMethod); + } + if (inputSignature_ != null) { + output.WriteRawTag(42); + output.WriteMessage(InputSignature); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (fullargspec_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Fullargspec); + } + if (IsMethod != false) { + size += 1 + 1; + } + if (inputSignature_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(InputSignature); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(FunctionSpec other) { + if (other == null) { + return; + } + if (other.fullargspec_ != null) { + if (fullargspec_ == null) { + Fullargspec = new global::Tensorflow.StructuredValue(); + } + Fullargspec.MergeFrom(other.Fullargspec); + } + if (other.IsMethod != false) { + IsMethod = other.IsMethod; + } + if (other.inputSignature_ != null) { + if (inputSignature_ == null) { + InputSignature = new global::Tensorflow.StructuredValue(); + } + InputSignature.MergeFrom(other.InputSignature); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (fullargspec_ == null) { + Fullargspec = new global::Tensorflow.StructuredValue(); + } + input.ReadMessage(Fullargspec); + break; + } + case 16: { + IsMethod = input.ReadBool(); + break; + } + case 42: { + if (inputSignature_ == null) { + InputSignature = new global::Tensorflow.StructuredValue(); + } + input.ReadMessage(InputSignature); + break; + } + } + } + } + + } + + /// + /// A SavedResource represents a TF object that holds state during its lifetime. + /// An object of this type can have a reference to a: + /// create_resource() and an initialize() function. + /// + public sealed partial class SavedResource : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SavedResource()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.SavedObjectGraphReflection.Descriptor.MessageTypes[10]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SavedResource() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SavedResource(SavedResource other) : this() { + device_ = other.device_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SavedResource Clone() { + return new SavedResource(this); + } + + /// Field number for the "device" field. + public const int DeviceFieldNumber = 1; + private string device_ = ""; + /// + /// A device specification indicating a required placement for the resource + /// creation function, e.g. "CPU". An empty string allows the user to select a + /// device. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string Device { + get { return device_; } + set { + device_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as SavedResource); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(SavedResource other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Device != other.Device) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Device.Length != 0) hash ^= Device.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (Device.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Device); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Device.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Device); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(SavedResource other) { + if (other == null) { + return; + } + if (other.Device.Length != 0) { + Device = other.Device; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Device = input.ReadString(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/src/TensorFlowNET.Core/Protobuf/Saver.cs b/src/TensorFlowNET.Core/Protobuf/Saver.cs index e031f2f6..1394ea91 100644 --- a/src/TensorFlowNET.Core/Protobuf/Saver.cs +++ b/src/TensorFlowNET.Core/Protobuf/Saver.cs @@ -1,6 +1,6 @@ // // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: saver.proto +// source: tensorflow/core/protobuf/saver.proto // #pragma warning disable 1591, 0612, 3021 #region Designer generated code @@ -11,11 +11,11 @@ using pbr = global::Google.Protobuf.Reflection; using scg = global::System.Collections.Generic; namespace Tensorflow { - /// Holder for reflection information generated from saver.proto + /// Holder for reflection information generated from tensorflow/core/protobuf/saver.proto public static partial class SaverReflection { #region Descriptor - /// File descriptor for saver.proto + /// File descriptor for tensorflow/core/protobuf/saver.proto public static pbr::FileDescriptor Descriptor { get { return descriptor; } } @@ -24,20 +24,20 @@ namespace Tensorflow { static SaverReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( - "CgtzYXZlci5wcm90bxIKdGVuc29yZmxvdyKeAgoIU2F2ZXJEZWYSHAoUZmls", - "ZW5hbWVfdGVuc29yX25hbWUYASABKAkSGAoQc2F2ZV90ZW5zb3JfbmFtZRgC", - "IAEoCRIXCg9yZXN0b3JlX29wX25hbWUYAyABKAkSEwoLbWF4X3RvX2tlZXAY", - "BCABKAUSDwoHc2hhcmRlZBgFIAEoCBIlCh1rZWVwX2NoZWNrcG9pbnRfZXZl", - "cnlfbl9ob3VycxgGIAEoAhI9Cgd2ZXJzaW9uGAcgASgOMiwudGVuc29yZmxv", - "dy5TYXZlckRlZi5DaGVja3BvaW50Rm9ybWF0VmVyc2lvbiI1ChdDaGVja3Bv", - "aW50Rm9ybWF0VmVyc2lvbhIKCgZMRUdBQ1kQABIGCgJWMRABEgYKAlYyEAJC", - "ZQoTb3JnLnRlbnNvcmZsb3cudXRpbEILU2F2ZXJQcm90b3NQAVo8Z2l0aHVi", - "LmNvbS90ZW5zb3JmbG93L3RlbnNvcmZsb3cvdGVuc29yZmxvdy9nby9jb3Jl", - "L3Byb3RvYnVm+AEBYgZwcm90bzM=")); + "CiR0ZW5zb3JmbG93L2NvcmUvcHJvdG9idWYvc2F2ZXIucHJvdG8SCnRlbnNv", + "cmZsb3cingIKCFNhdmVyRGVmEhwKFGZpbGVuYW1lX3RlbnNvcl9uYW1lGAEg", + "ASgJEhgKEHNhdmVfdGVuc29yX25hbWUYAiABKAkSFwoPcmVzdG9yZV9vcF9u", + "YW1lGAMgASgJEhMKC21heF90b19rZWVwGAQgASgFEg8KB3NoYXJkZWQYBSAB", + "KAgSJQoda2VlcF9jaGVja3BvaW50X2V2ZXJ5X25faG91cnMYBiABKAISPQoH", + "dmVyc2lvbhgHIAEoDjIsLnRlbnNvcmZsb3cuU2F2ZXJEZWYuQ2hlY2twb2lu", + "dEZvcm1hdFZlcnNpb24iNQoXQ2hlY2twb2ludEZvcm1hdFZlcnNpb24SCgoG", + "TEVHQUNZEAASBgoCVjEQARIGCgJWMhACQmUKE29yZy50ZW5zb3JmbG93LnV0", + "aWxCC1NhdmVyUHJvdG9zUAFaPGdpdGh1Yi5jb20vdGVuc29yZmxvdy90ZW5z", + "b3JmbG93L3RlbnNvcmZsb3cvZ28vY29yZS9wcm90b2J1ZvgBAWIGcHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, - new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.SaverDef), global::Tensorflow.SaverDef.Parser, new[]{ "FilenameTensorName", "SaveTensorName", "RestoreOpName", "MaxToKeep", "Sharded", "KeepCheckpointEveryNHours", "Version" }, null, new[]{ typeof(global::Tensorflow.SaverDef.Types.CheckpointFormatVersion) }, null) + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.SaverDef), global::Tensorflow.SaverDef.Parser, new[]{ "FilenameTensorName", "SaveTensorName", "RestoreOpName", "MaxToKeep", "Sharded", "KeepCheckpointEveryNHours", "Version" }, null, new[]{ typeof(global::Tensorflow.SaverDef.Types.CheckpointFormatVersion) }, null, null) })); } #endregion @@ -177,7 +177,7 @@ namespace Tensorflow { /// Field number for the "version" field. public const int VersionFieldNumber = 7; - private global::Tensorflow.SaverDef.Types.CheckpointFormatVersion version_ = 0; + private global::Tensorflow.SaverDef.Types.CheckpointFormatVersion version_ = global::Tensorflow.SaverDef.Types.CheckpointFormatVersion.Legacy; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public global::Tensorflow.SaverDef.Types.CheckpointFormatVersion Version { get { return version_; } @@ -218,7 +218,7 @@ namespace Tensorflow { if (MaxToKeep != 0) hash ^= MaxToKeep.GetHashCode(); if (Sharded != false) hash ^= Sharded.GetHashCode(); if (KeepCheckpointEveryNHours != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(KeepCheckpointEveryNHours); - if (Version != 0) hash ^= Version.GetHashCode(); + if (Version != global::Tensorflow.SaverDef.Types.CheckpointFormatVersion.Legacy) hash ^= Version.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -256,7 +256,7 @@ namespace Tensorflow { output.WriteRawTag(53); output.WriteFloat(KeepCheckpointEveryNHours); } - if (Version != 0) { + if (Version != global::Tensorflow.SaverDef.Types.CheckpointFormatVersion.Legacy) { output.WriteRawTag(56); output.WriteEnum((int) Version); } @@ -286,7 +286,7 @@ namespace Tensorflow { if (KeepCheckpointEveryNHours != 0F) { size += 1 + 4; } - if (Version != 0) { + if (Version != global::Tensorflow.SaverDef.Types.CheckpointFormatVersion.Legacy) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Version); } if (_unknownFields != null) { @@ -318,7 +318,7 @@ namespace Tensorflow { if (other.KeepCheckpointEveryNHours != 0F) { KeepCheckpointEveryNHours = other.KeepCheckpointEveryNHours; } - if (other.Version != 0) { + if (other.Version != global::Tensorflow.SaverDef.Types.CheckpointFormatVersion.Legacy) { Version = other.Version; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); @@ -357,7 +357,7 @@ namespace Tensorflow { break; } case 56: { - version_ = (global::Tensorflow.SaverDef.Types.CheckpointFormatVersion) input.ReadEnum(); + Version = (global::Tensorflow.SaverDef.Types.CheckpointFormatVersion) input.ReadEnum(); break; } } diff --git a/src/TensorFlowNET.Core/Protobuf/StepStats.cs b/src/TensorFlowNET.Core/Protobuf/StepStats.cs index 602d1d70..6cb12f01 100644 --- a/src/TensorFlowNET.Core/Protobuf/StepStats.cs +++ b/src/TensorFlowNET.Core/Protobuf/StepStats.cs @@ -52,23 +52,26 @@ namespace Tensorflow { "bW9yeV9zdGF0cxgMIAEoCzIXLnRlbnNvcmZsb3cuTWVtb3J5U3RhdHMSFwoP", "YWxsX3N0YXJ0X25hbm9zGA0gASgDEhoKEm9wX3N0YXJ0X3JlbF9uYW5vcxgO", "IAEoAxIYChBvcF9lbmRfcmVsX25hbm9zGA8gASgDEhkKEWFsbF9lbmRfcmVs", - "X25hbm9zGBAgASgDEhcKD3NjaGVkdWxlZF9uYW5vcxgRIAEoAyJQCg9EZXZp", - "Y2VTdGVwU3RhdHMSDgoGZGV2aWNlGAEgASgJEi0KCm5vZGVfc3RhdHMYAiAD", - "KAsyGS50ZW5zb3JmbG93Lk5vZGVFeGVjU3RhdHMiOwoJU3RlcFN0YXRzEi4K", - "CWRldl9zdGF0cxgBIAMoCzIbLnRlbnNvcmZsb3cuRGV2aWNlU3RlcFN0YXRz", - "Qm8KGG9yZy50ZW5zb3JmbG93LmZyYW1ld29ya0IPU3RlcFN0YXRzUHJvdG9z", - "UAFaPWdpdGh1Yi5jb20vdGVuc29yZmxvdy90ZW5zb3JmbG93L3RlbnNvcmZs", - "b3cvZ28vY29yZS9mcmFtZXdvcmv4AQFiBnByb3RvMw==")); + "X25hbm9zGBAgASgDEhcKD3NjaGVkdWxlZF9uYW5vcxgRIAEoAyLIAQoPRGV2", + "aWNlU3RlcFN0YXRzEg4KBmRldmljZRgBIAEoCRItCgpub2RlX3N0YXRzGAIg", + "AygLMhkudGVuc29yZmxvdy5Ob2RlRXhlY1N0YXRzEkIKDHRocmVhZF9uYW1l", + "cxgDIAMoCzIsLnRlbnNvcmZsb3cuRGV2aWNlU3RlcFN0YXRzLlRocmVhZE5h", + "bWVzRW50cnkaMgoQVGhyZWFkTmFtZXNFbnRyeRILCgNrZXkYASABKA0SDQoF", + "dmFsdWUYAiABKAk6AjgBIjsKCVN0ZXBTdGF0cxIuCglkZXZfc3RhdHMYASAD", + "KAsyGy50ZW5zb3JmbG93LkRldmljZVN0ZXBTdGF0c0JvChhvcmcudGVuc29y", + "Zmxvdy5mcmFtZXdvcmtCD1N0ZXBTdGF0c1Byb3Rvc1ABWj1naXRodWIuY29t", + "L3RlbnNvcmZsb3cvdGVuc29yZmxvdy90ZW5zb3JmbG93L2dvL2NvcmUvZnJh", + "bWV3b3Jr+AEBYgZwcm90bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Tensorflow.AllocationDescriptionReflection.Descriptor, global::Tensorflow.TensorDescriptionReflection.Descriptor, }, - new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.AllocationRecord), global::Tensorflow.AllocationRecord.Parser, new[]{ "AllocMicros", "AllocBytes" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.AllocatorMemoryUsed), global::Tensorflow.AllocatorMemoryUsed.Parser, new[]{ "AllocatorName", "TotalBytes", "PeakBytes", "LiveBytes", "AllocationRecords", "AllocatorBytesInUse" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.NodeOutput), global::Tensorflow.NodeOutput.Parser, new[]{ "Slot", "TensorDescription" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.MemoryStats), global::Tensorflow.MemoryStats.Parser, new[]{ "TempMemorySize", "PersistentMemorySize", "PersistentTensorAllocIds", "DeviceTempMemorySize", "DevicePersistentMemorySize", "DevicePersistentTensorAllocIds" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.NodeExecStats), global::Tensorflow.NodeExecStats.Parser, new[]{ "NodeName", "AllStartMicros", "OpStartRelMicros", "OpEndRelMicros", "AllEndRelMicros", "Memory", "Output", "TimelineLabel", "ScheduledMicros", "ThreadId", "ReferencedTensor", "MemoryStats", "AllStartNanos", "OpStartRelNanos", "OpEndRelNanos", "AllEndRelNanos", "ScheduledNanos" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.DeviceStepStats), global::Tensorflow.DeviceStepStats.Parser, new[]{ "Device", "NodeStats" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.StepStats), global::Tensorflow.StepStats.Parser, new[]{ "DevStats" }, null, null, null) + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.AllocationRecord), global::Tensorflow.AllocationRecord.Parser, new[]{ "AllocMicros", "AllocBytes" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.AllocatorMemoryUsed), global::Tensorflow.AllocatorMemoryUsed.Parser, new[]{ "AllocatorName", "TotalBytes", "PeakBytes", "LiveBytes", "AllocationRecords", "AllocatorBytesInUse" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.NodeOutput), global::Tensorflow.NodeOutput.Parser, new[]{ "Slot", "TensorDescription" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.MemoryStats), global::Tensorflow.MemoryStats.Parser, new[]{ "TempMemorySize", "PersistentMemorySize", "PersistentTensorAllocIds", "DeviceTempMemorySize", "DevicePersistentMemorySize", "DevicePersistentTensorAllocIds" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.NodeExecStats), global::Tensorflow.NodeExecStats.Parser, new[]{ "NodeName", "AllStartMicros", "OpStartRelMicros", "OpEndRelMicros", "AllEndRelMicros", "Memory", "Output", "TimelineLabel", "ScheduledMicros", "ThreadId", "ReferencedTensor", "MemoryStats", "AllStartNanos", "OpStartRelNanos", "OpEndRelNanos", "AllEndRelNanos", "ScheduledNanos" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.DeviceStepStats), global::Tensorflow.DeviceStepStats.Parser, new[]{ "Device", "NodeStats", "ThreadNames" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, }), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.StepStats), global::Tensorflow.StepStats.Parser, new[]{ "DevStats" }, null, null, null, null) })); } #endregion @@ -649,7 +652,7 @@ namespace Tensorflow { } if (other.tensorDescription_ != null) { if (tensorDescription_ == null) { - tensorDescription_ = new global::Tensorflow.TensorDescription(); + TensorDescription = new global::Tensorflow.TensorDescription(); } TensorDescription.MergeFrom(other.TensorDescription); } @@ -670,9 +673,9 @@ namespace Tensorflow { } case 26: { if (tensorDescription_ == null) { - tensorDescription_ = new global::Tensorflow.TensorDescription(); + TensorDescription = new global::Tensorflow.TensorDescription(); } - input.ReadMessage(tensorDescription_); + input.ReadMessage(TensorDescription); break; } } @@ -1403,7 +1406,7 @@ namespace Tensorflow { referencedTensor_.Add(other.referencedTensor_); if (other.memoryStats_ != null) { if (memoryStats_ == null) { - memoryStats_ = new global::Tensorflow.MemoryStats(); + MemoryStats = new global::Tensorflow.MemoryStats(); } MemoryStats.MergeFrom(other.MemoryStats); } @@ -1479,9 +1482,9 @@ namespace Tensorflow { } case 98: { if (memoryStats_ == null) { - memoryStats_ = new global::Tensorflow.MemoryStats(); + MemoryStats = new global::Tensorflow.MemoryStats(); } - input.ReadMessage(memoryStats_); + input.ReadMessage(MemoryStats); break; } case 104: { @@ -1537,6 +1540,7 @@ namespace Tensorflow { public DeviceStepStats(DeviceStepStats other) : this() { device_ = other.device_; nodeStats_ = other.nodeStats_.Clone(); + threadNames_ = other.threadNames_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -1566,6 +1570,19 @@ namespace Tensorflow { get { return nodeStats_; } } + /// Field number for the "thread_names" field. + public const int ThreadNamesFieldNumber = 3; + private static readonly pbc::MapField.Codec _map_threadNames_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForUInt32(8, 0), pb::FieldCodec.ForString(18, ""), 26); + private readonly pbc::MapField threadNames_ = new pbc::MapField(); + /// + /// Its key is thread id. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::MapField ThreadNames { + get { return threadNames_; } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as DeviceStepStats); @@ -1581,6 +1598,7 @@ namespace Tensorflow { } if (Device != other.Device) return false; if(!nodeStats_.Equals(other.nodeStats_)) return false; + if (!ThreadNames.Equals(other.ThreadNames)) return false; return Equals(_unknownFields, other._unknownFields); } @@ -1589,6 +1607,7 @@ namespace Tensorflow { int hash = 1; if (Device.Length != 0) hash ^= Device.GetHashCode(); hash ^= nodeStats_.GetHashCode(); + hash ^= ThreadNames.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -1607,6 +1626,7 @@ namespace Tensorflow { output.WriteString(Device); } nodeStats_.WriteTo(output, _repeated_nodeStats_codec); + threadNames_.WriteTo(output, _map_threadNames_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -1619,6 +1639,7 @@ namespace Tensorflow { size += 1 + pb::CodedOutputStream.ComputeStringSize(Device); } size += nodeStats_.CalculateSize(_repeated_nodeStats_codec); + size += threadNames_.CalculateSize(_map_threadNames_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -1634,6 +1655,7 @@ namespace Tensorflow { Device = other.Device; } nodeStats_.Add(other.nodeStats_); + threadNames_.Add(other.threadNames_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -1653,6 +1675,10 @@ namespace Tensorflow { nodeStats_.AddEntriesFrom(input, _repeated_nodeStats_codec); break; } + case 26: { + threadNames_.AddEntriesFrom(input, _map_threadNames_codec); + break; + } } } } diff --git a/src/TensorFlowNET.Core/Protobuf/Struct.cs b/src/TensorFlowNET.Core/Protobuf/Struct.cs new file mode 100644 index 00000000..803bc864 --- /dev/null +++ b/src/TensorFlowNET.Core/Protobuf/Struct.cs @@ -0,0 +1,1990 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/struct.proto +// +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tensorflow { + + /// Holder for reflection information generated from tensorflow/core/protobuf/struct.proto + public static partial class StructReflection { + + #region Descriptor + /// File descriptor for tensorflow/core/protobuf/struct.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static StructReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CiV0ZW5zb3JmbG93L2NvcmUvcHJvdG9idWYvc3RydWN0LnByb3RvEgp0ZW5z", + "b3JmbG93Gix0ZW5zb3JmbG93L2NvcmUvZnJhbWV3b3JrL3RlbnNvcl9zaGFw", + "ZS5wcm90bxoldGVuc29yZmxvdy9jb3JlL2ZyYW1ld29yay90eXBlcy5wcm90", + "byLHBAoPU3RydWN0dXJlZFZhbHVlEisKCm5vbmVfdmFsdWUYASABKAsyFS50", + "ZW5zb3JmbG93Lk5vbmVWYWx1ZUgAEhcKDWZsb2F0NjRfdmFsdWUYCyABKAFI", + "ABIVCgtpbnQ2NF92YWx1ZRgMIAEoEkgAEhYKDHN0cmluZ192YWx1ZRgNIAEo", + "CUgAEhQKCmJvb2xfdmFsdWUYDiABKAhIABI6ChJ0ZW5zb3Jfc2hhcGVfdmFs", + "dWUYHyABKAsyHC50ZW5zb3JmbG93LlRlbnNvclNoYXBlUHJvdG9IABIyChJ0", + "ZW5zb3JfZHR5cGVfdmFsdWUYICABKA4yFC50ZW5zb3JmbG93LkRhdGFUeXBl", + "SAASOAoRdGVuc29yX3NwZWNfdmFsdWUYISABKAsyGy50ZW5zb3JmbG93LlRl", + "bnNvclNwZWNQcm90b0gAEjQKD3R5cGVfc3BlY192YWx1ZRgiIAEoCzIZLnRl", + "bnNvcmZsb3cuVHlwZVNwZWNQcm90b0gAEisKCmxpc3RfdmFsdWUYMyABKAsy", + "FS50ZW5zb3JmbG93Lkxpc3RWYWx1ZUgAEi0KC3R1cGxlX3ZhbHVlGDQgASgL", + "MhYudGVuc29yZmxvdy5UdXBsZVZhbHVlSAASKwoKZGljdF92YWx1ZRg1IAEo", + "CzIVLnRlbnNvcmZsb3cuRGljdFZhbHVlSAASOAoRbmFtZWRfdHVwbGVfdmFs", + "dWUYNiABKAsyGy50ZW5zb3JmbG93Lk5hbWVkVHVwbGVWYWx1ZUgAQgYKBGtp", + "bmQiCwoJTm9uZVZhbHVlIjgKCUxpc3RWYWx1ZRIrCgZ2YWx1ZXMYASADKAsy", + "Gy50ZW5zb3JmbG93LlN0cnVjdHVyZWRWYWx1ZSI5CgpUdXBsZVZhbHVlEisK", + "BnZhbHVlcxgBIAMoCzIbLnRlbnNvcmZsb3cuU3RydWN0dXJlZFZhbHVlIooB", + "CglEaWN0VmFsdWUSMQoGZmllbGRzGAEgAygLMiEudGVuc29yZmxvdy5EaWN0", + "VmFsdWUuRmllbGRzRW50cnkaSgoLRmllbGRzRW50cnkSCwoDa2V5GAEgASgJ", + "EioKBXZhbHVlGAIgASgLMhsudGVuc29yZmxvdy5TdHJ1Y3R1cmVkVmFsdWU6", + "AjgBIkQKCVBhaXJWYWx1ZRILCgNrZXkYASABKAkSKgoFdmFsdWUYAiABKAsy", + "Gy50ZW5zb3JmbG93LlN0cnVjdHVyZWRWYWx1ZSJGCg9OYW1lZFR1cGxlVmFs", + "dWUSDAoEbmFtZRgBIAEoCRIlCgZ2YWx1ZXMYAiADKAsyFS50ZW5zb3JmbG93", + "LlBhaXJWYWx1ZSJxCg9UZW5zb3JTcGVjUHJvdG8SDAoEbmFtZRgBIAEoCRIr", + "CgVzaGFwZRgCIAEoCzIcLnRlbnNvcmZsb3cuVGVuc29yU2hhcGVQcm90bxIj", + "CgVkdHlwZRgDIAEoDjIULnRlbnNvcmZsb3cuRGF0YVR5cGUiigMKDVR5cGVT", + "cGVjUHJvdG8SQAoPdHlwZV9zcGVjX2NsYXNzGAEgASgOMicudGVuc29yZmxv", + "dy5UeXBlU3BlY1Byb3RvLlR5cGVTcGVjQ2xhc3MSLwoKdHlwZV9zdGF0ZRgC", + "IAEoCzIbLnRlbnNvcmZsb3cuU3RydWN0dXJlZFZhbHVlEhwKFHR5cGVfc3Bl", + "Y19jbGFzc19uYW1lGAMgASgJIucBCg1UeXBlU3BlY0NsYXNzEgsKB1VOS05P", + "V04QABIWChJTUEFSU0VfVEVOU09SX1NQRUMQARIXChNJTkRFWEVEX1NMSUNF", + "U19TUEVDEAISFgoSUkFHR0VEX1RFTlNPUl9TUEVDEAMSFQoRVEVOU09SX0FS", + "UkFZX1NQRUMQBBIVChFEQVRBX0RBVEFTRVRfU1BFQxAFEhYKEkRBVEFfSVRF", + "UkFUT1JfU1BFQxAGEhEKDU9QVElPTkFMX1NQRUMQBxIUChBQRVJfUkVQTElD", + "QV9TUEVDEAgSEQoNVkFSSUFCTEVfU1BFQxAJYgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Tensorflow.TensorShapeReflection.Descriptor, global::Tensorflow.TypesReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.StructuredValue), global::Tensorflow.StructuredValue.Parser, new[]{ "NoneValue", "Float64Value", "Int64Value", "StringValue", "BoolValue", "TensorShapeValue", "TensorDtypeValue", "TensorSpecValue", "TypeSpecValue", "ListValue", "TupleValue", "DictValue", "NamedTupleValue" }, new[]{ "Kind" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.NoneValue), global::Tensorflow.NoneValue.Parser, null, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.ListValue), global::Tensorflow.ListValue.Parser, new[]{ "Values" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.TupleValue), global::Tensorflow.TupleValue.Parser, new[]{ "Values" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.DictValue), global::Tensorflow.DictValue.Parser, new[]{ "Fields" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, }), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.PairValue), global::Tensorflow.PairValue.Parser, new[]{ "Key", "Value" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.NamedTupleValue), global::Tensorflow.NamedTupleValue.Parser, new[]{ "Name", "Values" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.TensorSpecProto), global::Tensorflow.TensorSpecProto.Parser, new[]{ "Name", "Shape", "Dtype" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.TypeSpecProto), global::Tensorflow.TypeSpecProto.Parser, new[]{ "TypeSpecClass", "TypeState", "TypeSpecClassName" }, null, new[]{ typeof(global::Tensorflow.TypeSpecProto.Types.TypeSpecClass) }, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// `StructuredValue` represents a dynamically typed value representing various + /// data structures that are inspired by Python data structures typically used in + /// TensorFlow functions as inputs and outputs. + /// + /// For example when saving a Layer there may be a `training` argument. If the + /// user passes a boolean True/False, that switches between two concrete + /// TensorFlow functions. In order to switch between them in the same way after + /// loading the SavedModel, we need to represent "True" and "False". + /// + /// A more advanced example might be a function which takes a list of + /// dictionaries mapping from strings to Tensors. In order to map from + /// user-specified arguments `[{"a": tf.constant(1.)}, {"q": tf.constant(3.)}]` + /// after load to the right saved TensorFlow function, we need to represent the + /// nested structure and the strings, recording that we have a trace for anything + /// matching `[{"a": tf.TensorSpec(None, tf.float32)}, {"q": tf.TensorSpec([], + /// tf.float64)}]` as an example. + /// + /// Likewise functions may return nested structures of Tensors, for example + /// returning a dictionary mapping from strings to Tensors. In order for the + /// loaded function to return the same structure we need to serialize it. + /// + /// This is an ergonomic aid for working with loaded SavedModels, not a promise + /// to serialize all possible function signatures. For example we do not expect + /// to pickle generic Python objects, and ideally we'd stay language-agnostic. + /// + public sealed partial class StructuredValue : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new StructuredValue()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.StructReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public StructuredValue() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public StructuredValue(StructuredValue other) : this() { + switch (other.KindCase) { + case KindOneofCase.NoneValue: + NoneValue = other.NoneValue.Clone(); + break; + case KindOneofCase.Float64Value: + Float64Value = other.Float64Value; + break; + case KindOneofCase.Int64Value: + Int64Value = other.Int64Value; + break; + case KindOneofCase.StringValue: + StringValue = other.StringValue; + break; + case KindOneofCase.BoolValue: + BoolValue = other.BoolValue; + break; + case KindOneofCase.TensorShapeValue: + TensorShapeValue = other.TensorShapeValue.Clone(); + break; + case KindOneofCase.TensorDtypeValue: + TensorDtypeValue = other.TensorDtypeValue; + break; + case KindOneofCase.TensorSpecValue: + TensorSpecValue = other.TensorSpecValue.Clone(); + break; + case KindOneofCase.TypeSpecValue: + TypeSpecValue = other.TypeSpecValue.Clone(); + break; + case KindOneofCase.ListValue: + ListValue = other.ListValue.Clone(); + break; + case KindOneofCase.TupleValue: + TupleValue = other.TupleValue.Clone(); + break; + case KindOneofCase.DictValue: + DictValue = other.DictValue.Clone(); + break; + case KindOneofCase.NamedTupleValue: + NamedTupleValue = other.NamedTupleValue.Clone(); + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public StructuredValue Clone() { + return new StructuredValue(this); + } + + /// Field number for the "none_value" field. + public const int NoneValueFieldNumber = 1; + /// + /// Represents None. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.NoneValue NoneValue { + get { return kindCase_ == KindOneofCase.NoneValue ? (global::Tensorflow.NoneValue) kind_ : null; } + set { + kind_ = value; + kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.NoneValue; + } + } + + /// Field number for the "float64_value" field. + public const int Float64ValueFieldNumber = 11; + /// + /// Represents a double-precision floating-point value (a Python `float`). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public double Float64Value { + get { return kindCase_ == KindOneofCase.Float64Value ? (double) kind_ : 0D; } + set { + kind_ = value; + kindCase_ = KindOneofCase.Float64Value; + } + } + + /// Field number for the "int64_value" field. + public const int Int64ValueFieldNumber = 12; + /// + /// Represents a signed integer value, limited to 64 bits. + /// Larger values from Python's arbitrary-precision integers are unsupported. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public long Int64Value { + get { return kindCase_ == KindOneofCase.Int64Value ? (long) kind_ : 0L; } + set { + kind_ = value; + kindCase_ = KindOneofCase.Int64Value; + } + } + + /// Field number for the "string_value" field. + public const int StringValueFieldNumber = 13; + /// + /// Represents a string of Unicode characters stored in a Python `str`. + /// In Python 3, this is exactly what type `str` is. + /// In Python 2, this is the UTF-8 encoding of the characters. + /// For strings with ASCII characters only (as often used in TensorFlow code) + /// there is effectively no difference between the language versions. + /// The obsolescent `unicode` type of Python 2 is not supported here. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string StringValue { + get { return kindCase_ == KindOneofCase.StringValue ? (string) kind_ : ""; } + set { + kind_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + kindCase_ = KindOneofCase.StringValue; + } + } + + /// Field number for the "bool_value" field. + public const int BoolValueFieldNumber = 14; + /// + /// Represents a boolean value. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool BoolValue { + get { return kindCase_ == KindOneofCase.BoolValue ? (bool) kind_ : false; } + set { + kind_ = value; + kindCase_ = KindOneofCase.BoolValue; + } + } + + /// Field number for the "tensor_shape_value" field. + public const int TensorShapeValueFieldNumber = 31; + /// + /// Represents a TensorShape. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.TensorShapeProto TensorShapeValue { + get { return kindCase_ == KindOneofCase.TensorShapeValue ? (global::Tensorflow.TensorShapeProto) kind_ : null; } + set { + kind_ = value; + kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.TensorShapeValue; + } + } + + /// Field number for the "tensor_dtype_value" field. + public const int TensorDtypeValueFieldNumber = 32; + /// + /// Represents an enum value for dtype. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.DataType TensorDtypeValue { + get { return kindCase_ == KindOneofCase.TensorDtypeValue ? (global::Tensorflow.DataType) kind_ : global::Tensorflow.DataType.DtInvalid; } + set { + kind_ = value; + kindCase_ = KindOneofCase.TensorDtypeValue; + } + } + + /// Field number for the "tensor_spec_value" field. + public const int TensorSpecValueFieldNumber = 33; + /// + /// Represents a value for tf.TensorSpec. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.TensorSpecProto TensorSpecValue { + get { return kindCase_ == KindOneofCase.TensorSpecValue ? (global::Tensorflow.TensorSpecProto) kind_ : null; } + set { + kind_ = value; + kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.TensorSpecValue; + } + } + + /// Field number for the "type_spec_value" field. + public const int TypeSpecValueFieldNumber = 34; + /// + /// Represents a value for tf.TypeSpec. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.TypeSpecProto TypeSpecValue { + get { return kindCase_ == KindOneofCase.TypeSpecValue ? (global::Tensorflow.TypeSpecProto) kind_ : null; } + set { + kind_ = value; + kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.TypeSpecValue; + } + } + + /// Field number for the "list_value" field. + public const int ListValueFieldNumber = 51; + /// + /// Represents a list of `Value`. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.ListValue ListValue { + get { return kindCase_ == KindOneofCase.ListValue ? (global::Tensorflow.ListValue) kind_ : null; } + set { + kind_ = value; + kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.ListValue; + } + } + + /// Field number for the "tuple_value" field. + public const int TupleValueFieldNumber = 52; + /// + /// Represents a tuple of `Value`. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.TupleValue TupleValue { + get { return kindCase_ == KindOneofCase.TupleValue ? (global::Tensorflow.TupleValue) kind_ : null; } + set { + kind_ = value; + kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.TupleValue; + } + } + + /// Field number for the "dict_value" field. + public const int DictValueFieldNumber = 53; + /// + /// Represents a dict `Value`. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.DictValue DictValue { + get { return kindCase_ == KindOneofCase.DictValue ? (global::Tensorflow.DictValue) kind_ : null; } + set { + kind_ = value; + kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.DictValue; + } + } + + /// Field number for the "named_tuple_value" field. + public const int NamedTupleValueFieldNumber = 54; + /// + /// Represents Python's namedtuple. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.NamedTupleValue NamedTupleValue { + get { return kindCase_ == KindOneofCase.NamedTupleValue ? (global::Tensorflow.NamedTupleValue) kind_ : null; } + set { + kind_ = value; + kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.NamedTupleValue; + } + } + + private object kind_; + /// Enum of possible cases for the "kind" oneof. + public enum KindOneofCase { + None = 0, + NoneValue = 1, + Float64Value = 11, + Int64Value = 12, + StringValue = 13, + BoolValue = 14, + TensorShapeValue = 31, + TensorDtypeValue = 32, + TensorSpecValue = 33, + TypeSpecValue = 34, + ListValue = 51, + TupleValue = 52, + DictValue = 53, + NamedTupleValue = 54, + } + private KindOneofCase kindCase_ = KindOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public KindOneofCase KindCase { + get { return kindCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearKind() { + kindCase_ = KindOneofCase.None; + kind_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as StructuredValue); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(StructuredValue other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(NoneValue, other.NoneValue)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(Float64Value, other.Float64Value)) return false; + if (Int64Value != other.Int64Value) return false; + if (StringValue != other.StringValue) return false; + if (BoolValue != other.BoolValue) return false; + if (!object.Equals(TensorShapeValue, other.TensorShapeValue)) return false; + if (TensorDtypeValue != other.TensorDtypeValue) return false; + if (!object.Equals(TensorSpecValue, other.TensorSpecValue)) return false; + if (!object.Equals(TypeSpecValue, other.TypeSpecValue)) return false; + if (!object.Equals(ListValue, other.ListValue)) return false; + if (!object.Equals(TupleValue, other.TupleValue)) return false; + if (!object.Equals(DictValue, other.DictValue)) return false; + if (!object.Equals(NamedTupleValue, other.NamedTupleValue)) return false; + if (KindCase != other.KindCase) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (kindCase_ == KindOneofCase.NoneValue) hash ^= NoneValue.GetHashCode(); + if (kindCase_ == KindOneofCase.Float64Value) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(Float64Value); + if (kindCase_ == KindOneofCase.Int64Value) hash ^= Int64Value.GetHashCode(); + if (kindCase_ == KindOneofCase.StringValue) hash ^= StringValue.GetHashCode(); + if (kindCase_ == KindOneofCase.BoolValue) hash ^= BoolValue.GetHashCode(); + if (kindCase_ == KindOneofCase.TensorShapeValue) hash ^= TensorShapeValue.GetHashCode(); + if (kindCase_ == KindOneofCase.TensorDtypeValue) hash ^= TensorDtypeValue.GetHashCode(); + if (kindCase_ == KindOneofCase.TensorSpecValue) hash ^= TensorSpecValue.GetHashCode(); + if (kindCase_ == KindOneofCase.TypeSpecValue) hash ^= TypeSpecValue.GetHashCode(); + if (kindCase_ == KindOneofCase.ListValue) hash ^= ListValue.GetHashCode(); + if (kindCase_ == KindOneofCase.TupleValue) hash ^= TupleValue.GetHashCode(); + if (kindCase_ == KindOneofCase.DictValue) hash ^= DictValue.GetHashCode(); + if (kindCase_ == KindOneofCase.NamedTupleValue) hash ^= NamedTupleValue.GetHashCode(); + hash ^= (int) kindCase_; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (kindCase_ == KindOneofCase.NoneValue) { + output.WriteRawTag(10); + output.WriteMessage(NoneValue); + } + if (kindCase_ == KindOneofCase.Float64Value) { + output.WriteRawTag(89); + output.WriteDouble(Float64Value); + } + if (kindCase_ == KindOneofCase.Int64Value) { + output.WriteRawTag(96); + output.WriteSInt64(Int64Value); + } + if (kindCase_ == KindOneofCase.StringValue) { + output.WriteRawTag(106); + output.WriteString(StringValue); + } + if (kindCase_ == KindOneofCase.BoolValue) { + output.WriteRawTag(112); + output.WriteBool(BoolValue); + } + if (kindCase_ == KindOneofCase.TensorShapeValue) { + output.WriteRawTag(250, 1); + output.WriteMessage(TensorShapeValue); + } + if (kindCase_ == KindOneofCase.TensorDtypeValue) { + output.WriteRawTag(128, 2); + output.WriteEnum((int) TensorDtypeValue); + } + if (kindCase_ == KindOneofCase.TensorSpecValue) { + output.WriteRawTag(138, 2); + output.WriteMessage(TensorSpecValue); + } + if (kindCase_ == KindOneofCase.TypeSpecValue) { + output.WriteRawTag(146, 2); + output.WriteMessage(TypeSpecValue); + } + if (kindCase_ == KindOneofCase.ListValue) { + output.WriteRawTag(154, 3); + output.WriteMessage(ListValue); + } + if (kindCase_ == KindOneofCase.TupleValue) { + output.WriteRawTag(162, 3); + output.WriteMessage(TupleValue); + } + if (kindCase_ == KindOneofCase.DictValue) { + output.WriteRawTag(170, 3); + output.WriteMessage(DictValue); + } + if (kindCase_ == KindOneofCase.NamedTupleValue) { + output.WriteRawTag(178, 3); + output.WriteMessage(NamedTupleValue); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (kindCase_ == KindOneofCase.NoneValue) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(NoneValue); + } + if (kindCase_ == KindOneofCase.Float64Value) { + size += 1 + 8; + } + if (kindCase_ == KindOneofCase.Int64Value) { + size += 1 + pb::CodedOutputStream.ComputeSInt64Size(Int64Value); + } + if (kindCase_ == KindOneofCase.StringValue) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(StringValue); + } + if (kindCase_ == KindOneofCase.BoolValue) { + size += 1 + 1; + } + if (kindCase_ == KindOneofCase.TensorShapeValue) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(TensorShapeValue); + } + if (kindCase_ == KindOneofCase.TensorDtypeValue) { + size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) TensorDtypeValue); + } + if (kindCase_ == KindOneofCase.TensorSpecValue) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(TensorSpecValue); + } + if (kindCase_ == KindOneofCase.TypeSpecValue) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(TypeSpecValue); + } + if (kindCase_ == KindOneofCase.ListValue) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(ListValue); + } + if (kindCase_ == KindOneofCase.TupleValue) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(TupleValue); + } + if (kindCase_ == KindOneofCase.DictValue) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(DictValue); + } + if (kindCase_ == KindOneofCase.NamedTupleValue) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(NamedTupleValue); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(StructuredValue other) { + if (other == null) { + return; + } + switch (other.KindCase) { + case KindOneofCase.NoneValue: + if (NoneValue == null) { + NoneValue = new global::Tensorflow.NoneValue(); + } + NoneValue.MergeFrom(other.NoneValue); + break; + case KindOneofCase.Float64Value: + Float64Value = other.Float64Value; + break; + case KindOneofCase.Int64Value: + Int64Value = other.Int64Value; + break; + case KindOneofCase.StringValue: + StringValue = other.StringValue; + break; + case KindOneofCase.BoolValue: + BoolValue = other.BoolValue; + break; + case KindOneofCase.TensorShapeValue: + if (TensorShapeValue == null) { + TensorShapeValue = new global::Tensorflow.TensorShapeProto(); + } + TensorShapeValue.MergeFrom(other.TensorShapeValue); + break; + case KindOneofCase.TensorDtypeValue: + TensorDtypeValue = other.TensorDtypeValue; + break; + case KindOneofCase.TensorSpecValue: + if (TensorSpecValue == null) { + TensorSpecValue = new global::Tensorflow.TensorSpecProto(); + } + TensorSpecValue.MergeFrom(other.TensorSpecValue); + break; + case KindOneofCase.TypeSpecValue: + if (TypeSpecValue == null) { + TypeSpecValue = new global::Tensorflow.TypeSpecProto(); + } + TypeSpecValue.MergeFrom(other.TypeSpecValue); + break; + case KindOneofCase.ListValue: + if (ListValue == null) { + ListValue = new global::Tensorflow.ListValue(); + } + ListValue.MergeFrom(other.ListValue); + break; + case KindOneofCase.TupleValue: + if (TupleValue == null) { + TupleValue = new global::Tensorflow.TupleValue(); + } + TupleValue.MergeFrom(other.TupleValue); + break; + case KindOneofCase.DictValue: + if (DictValue == null) { + DictValue = new global::Tensorflow.DictValue(); + } + DictValue.MergeFrom(other.DictValue); + break; + case KindOneofCase.NamedTupleValue: + if (NamedTupleValue == null) { + NamedTupleValue = new global::Tensorflow.NamedTupleValue(); + } + NamedTupleValue.MergeFrom(other.NamedTupleValue); + break; + } + + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + global::Tensorflow.NoneValue subBuilder = new global::Tensorflow.NoneValue(); + if (kindCase_ == KindOneofCase.NoneValue) { + subBuilder.MergeFrom(NoneValue); + } + input.ReadMessage(subBuilder); + NoneValue = subBuilder; + break; + } + case 89: { + Float64Value = input.ReadDouble(); + break; + } + case 96: { + Int64Value = input.ReadSInt64(); + break; + } + case 106: { + StringValue = input.ReadString(); + break; + } + case 112: { + BoolValue = input.ReadBool(); + break; + } + case 250: { + global::Tensorflow.TensorShapeProto subBuilder = new global::Tensorflow.TensorShapeProto(); + if (kindCase_ == KindOneofCase.TensorShapeValue) { + subBuilder.MergeFrom(TensorShapeValue); + } + input.ReadMessage(subBuilder); + TensorShapeValue = subBuilder; + break; + } + case 256: { + kind_ = input.ReadEnum(); + kindCase_ = KindOneofCase.TensorDtypeValue; + break; + } + case 266: { + global::Tensorflow.TensorSpecProto subBuilder = new global::Tensorflow.TensorSpecProto(); + if (kindCase_ == KindOneofCase.TensorSpecValue) { + subBuilder.MergeFrom(TensorSpecValue); + } + input.ReadMessage(subBuilder); + TensorSpecValue = subBuilder; + break; + } + case 274: { + global::Tensorflow.TypeSpecProto subBuilder = new global::Tensorflow.TypeSpecProto(); + if (kindCase_ == KindOneofCase.TypeSpecValue) { + subBuilder.MergeFrom(TypeSpecValue); + } + input.ReadMessage(subBuilder); + TypeSpecValue = subBuilder; + break; + } + case 410: { + global::Tensorflow.ListValue subBuilder = new global::Tensorflow.ListValue(); + if (kindCase_ == KindOneofCase.ListValue) { + subBuilder.MergeFrom(ListValue); + } + input.ReadMessage(subBuilder); + ListValue = subBuilder; + break; + } + case 418: { + global::Tensorflow.TupleValue subBuilder = new global::Tensorflow.TupleValue(); + if (kindCase_ == KindOneofCase.TupleValue) { + subBuilder.MergeFrom(TupleValue); + } + input.ReadMessage(subBuilder); + TupleValue = subBuilder; + break; + } + case 426: { + global::Tensorflow.DictValue subBuilder = new global::Tensorflow.DictValue(); + if (kindCase_ == KindOneofCase.DictValue) { + subBuilder.MergeFrom(DictValue); + } + input.ReadMessage(subBuilder); + DictValue = subBuilder; + break; + } + case 434: { + global::Tensorflow.NamedTupleValue subBuilder = new global::Tensorflow.NamedTupleValue(); + if (kindCase_ == KindOneofCase.NamedTupleValue) { + subBuilder.MergeFrom(NamedTupleValue); + } + input.ReadMessage(subBuilder); + NamedTupleValue = subBuilder; + break; + } + } + } + } + + } + + /// + /// Represents None. + /// + public sealed partial class NoneValue : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new NoneValue()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.StructReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public NoneValue() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public NoneValue(NoneValue other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public NoneValue Clone() { + return new NoneValue(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as NoneValue); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(NoneValue other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(NoneValue other) { + if (other == null) { + return; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + } + } + } + + } + + /// + /// Represents a Python list. + /// + public sealed partial class ListValue : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ListValue()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.StructReflection.Descriptor.MessageTypes[2]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ListValue() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ListValue(ListValue other) : this() { + values_ = other.values_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ListValue Clone() { + return new ListValue(this); + } + + /// Field number for the "values" field. + public const int ValuesFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_values_codec + = pb::FieldCodec.ForMessage(10, global::Tensorflow.StructuredValue.Parser); + private readonly pbc::RepeatedField values_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField Values { + get { return values_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as ListValue); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(ListValue other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!values_.Equals(other.values_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + hash ^= values_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + values_.WriteTo(output, _repeated_values_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + size += values_.CalculateSize(_repeated_values_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(ListValue other) { + if (other == null) { + return; + } + values_.Add(other.values_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + values_.AddEntriesFrom(input, _repeated_values_codec); + break; + } + } + } + } + + } + + /// + /// Represents a Python tuple. + /// + public sealed partial class TupleValue : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TupleValue()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.StructReflection.Descriptor.MessageTypes[3]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public TupleValue() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public TupleValue(TupleValue other) : this() { + values_ = other.values_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public TupleValue Clone() { + return new TupleValue(this); + } + + /// Field number for the "values" field. + public const int ValuesFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_values_codec + = pb::FieldCodec.ForMessage(10, global::Tensorflow.StructuredValue.Parser); + private readonly pbc::RepeatedField values_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField Values { + get { return values_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as TupleValue); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(TupleValue other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!values_.Equals(other.values_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + hash ^= values_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + values_.WriteTo(output, _repeated_values_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + size += values_.CalculateSize(_repeated_values_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(TupleValue other) { + if (other == null) { + return; + } + values_.Add(other.values_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + values_.AddEntriesFrom(input, _repeated_values_codec); + break; + } + } + } + } + + } + + /// + /// Represents a Python dict keyed by `str`. + /// The comment on Unicode from Value.string_value applies analogously. + /// + public sealed partial class DictValue : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DictValue()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.StructReflection.Descriptor.MessageTypes[4]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public DictValue() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public DictValue(DictValue other) : this() { + fields_ = other.fields_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public DictValue Clone() { + return new DictValue(this); + } + + /// Field number for the "fields" field. + public const int FieldsFieldNumber = 1; + private static readonly pbc::MapField.Codec _map_fields_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForMessage(18, global::Tensorflow.StructuredValue.Parser), 10); + private readonly pbc::MapField fields_ = new pbc::MapField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::MapField Fields { + get { return fields_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as DictValue); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(DictValue other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!Fields.Equals(other.Fields)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + hash ^= Fields.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + fields_.WriteTo(output, _map_fields_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + size += fields_.CalculateSize(_map_fields_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(DictValue other) { + if (other == null) { + return; + } + fields_.Add(other.fields_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + fields_.AddEntriesFrom(input, _map_fields_codec); + break; + } + } + } + } + + } + + /// + /// Represents a (key, value) pair. + /// + public sealed partial class PairValue : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PairValue()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.StructReflection.Descriptor.MessageTypes[5]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public PairValue() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public PairValue(PairValue other) : this() { + key_ = other.key_; + value_ = other.value_ != null ? other.value_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public PairValue Clone() { + return new PairValue(this); + } + + /// Field number for the "key" field. + public const int KeyFieldNumber = 1; + private string key_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string Key { + get { return key_; } + set { + key_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "value" field. + public const int ValueFieldNumber = 2; + private global::Tensorflow.StructuredValue value_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.StructuredValue Value { + get { return value_; } + set { + value_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as PairValue); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(PairValue other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Key != other.Key) return false; + if (!object.Equals(Value, other.Value)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Key.Length != 0) hash ^= Key.GetHashCode(); + if (value_ != null) hash ^= Value.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (Key.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Key); + } + if (value_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Value); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Key.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Key); + } + if (value_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Value); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(PairValue other) { + if (other == null) { + return; + } + if (other.Key.Length != 0) { + Key = other.Key; + } + if (other.value_ != null) { + if (value_ == null) { + Value = new global::Tensorflow.StructuredValue(); + } + Value.MergeFrom(other.Value); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Key = input.ReadString(); + break; + } + case 18: { + if (value_ == null) { + Value = new global::Tensorflow.StructuredValue(); + } + input.ReadMessage(Value); + break; + } + } + } + } + + } + + /// + /// Represents Python's namedtuple. + /// + public sealed partial class NamedTupleValue : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new NamedTupleValue()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.StructReflection.Descriptor.MessageTypes[6]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public NamedTupleValue() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public NamedTupleValue(NamedTupleValue other) : this() { + name_ = other.name_; + values_ = other.values_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public NamedTupleValue Clone() { + return new NamedTupleValue(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "values" field. + public const int ValuesFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_values_codec + = pb::FieldCodec.ForMessage(18, global::Tensorflow.PairValue.Parser); + private readonly pbc::RepeatedField values_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField Values { + get { return values_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as NamedTupleValue); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(NamedTupleValue other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if(!values_.Equals(other.values_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + hash ^= values_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + values_.WriteTo(output, _repeated_values_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + size += values_.CalculateSize(_repeated_values_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(NamedTupleValue other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + values_.Add(other.values_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + values_.AddEntriesFrom(input, _repeated_values_codec); + break; + } + } + } + } + + } + + /// + /// A protobuf to tf.TensorSpec. + /// + public sealed partial class TensorSpecProto : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TensorSpecProto()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.StructReflection.Descriptor.MessageTypes[7]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public TensorSpecProto() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public TensorSpecProto(TensorSpecProto other) : this() { + name_ = other.name_; + shape_ = other.shape_ != null ? other.shape_.Clone() : null; + dtype_ = other.dtype_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public TensorSpecProto Clone() { + return new TensorSpecProto(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "shape" field. + public const int ShapeFieldNumber = 2; + private global::Tensorflow.TensorShapeProto shape_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.TensorShapeProto Shape { + get { return shape_; } + set { + shape_ = value; + } + } + + /// Field number for the "dtype" field. + public const int DtypeFieldNumber = 3; + private global::Tensorflow.DataType dtype_ = global::Tensorflow.DataType.DtInvalid; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.DataType Dtype { + get { return dtype_; } + set { + dtype_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as TensorSpecProto); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(TensorSpecProto other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if (!object.Equals(Shape, other.Shape)) return false; + if (Dtype != other.Dtype) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (shape_ != null) hash ^= Shape.GetHashCode(); + if (Dtype != global::Tensorflow.DataType.DtInvalid) hash ^= Dtype.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (shape_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Shape); + } + if (Dtype != global::Tensorflow.DataType.DtInvalid) { + output.WriteRawTag(24); + output.WriteEnum((int) Dtype); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (shape_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Shape); + } + if (Dtype != global::Tensorflow.DataType.DtInvalid) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Dtype); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(TensorSpecProto other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.shape_ != null) { + if (shape_ == null) { + Shape = new global::Tensorflow.TensorShapeProto(); + } + Shape.MergeFrom(other.Shape); + } + if (other.Dtype != global::Tensorflow.DataType.DtInvalid) { + Dtype = other.Dtype; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + if (shape_ == null) { + Shape = new global::Tensorflow.TensorShapeProto(); + } + input.ReadMessage(Shape); + break; + } + case 24: { + Dtype = (global::Tensorflow.DataType) input.ReadEnum(); + break; + } + } + } + } + + } + + /// + /// Represents a tf.TypeSpec + /// + public sealed partial class TypeSpecProto : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TypeSpecProto()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.StructReflection.Descriptor.MessageTypes[8]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public TypeSpecProto() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public TypeSpecProto(TypeSpecProto other) : this() { + typeSpecClass_ = other.typeSpecClass_; + typeState_ = other.typeState_ != null ? other.typeState_.Clone() : null; + typeSpecClassName_ = other.typeSpecClassName_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public TypeSpecProto Clone() { + return new TypeSpecProto(this); + } + + /// Field number for the "type_spec_class" field. + public const int TypeSpecClassFieldNumber = 1; + private global::Tensorflow.TypeSpecProto.Types.TypeSpecClass typeSpecClass_ = global::Tensorflow.TypeSpecProto.Types.TypeSpecClass.Unknown; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.TypeSpecProto.Types.TypeSpecClass TypeSpecClass { + get { return typeSpecClass_; } + set { + typeSpecClass_ = value; + } + } + + /// Field number for the "type_state" field. + public const int TypeStateFieldNumber = 2; + private global::Tensorflow.StructuredValue typeState_; + /// + /// The value returned by TypeSpec._serialize(). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.StructuredValue TypeState { + get { return typeState_; } + set { + typeState_ = value; + } + } + + /// Field number for the "type_spec_class_name" field. + public const int TypeSpecClassNameFieldNumber = 3; + private string typeSpecClassName_ = ""; + /// + /// This is currently redundant with the type_spec_class enum, and is only + /// used for error reporting. In particular, if you use an older binary to + /// load a newer model, and the model uses a TypeSpecClass that the older + /// binary doesn't support, then this lets us display a useful error message. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string TypeSpecClassName { + get { return typeSpecClassName_; } + set { + typeSpecClassName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as TypeSpecProto); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(TypeSpecProto other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (TypeSpecClass != other.TypeSpecClass) return false; + if (!object.Equals(TypeState, other.TypeState)) return false; + if (TypeSpecClassName != other.TypeSpecClassName) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (TypeSpecClass != global::Tensorflow.TypeSpecProto.Types.TypeSpecClass.Unknown) hash ^= TypeSpecClass.GetHashCode(); + if (typeState_ != null) hash ^= TypeState.GetHashCode(); + if (TypeSpecClassName.Length != 0) hash ^= TypeSpecClassName.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (TypeSpecClass != global::Tensorflow.TypeSpecProto.Types.TypeSpecClass.Unknown) { + output.WriteRawTag(8); + output.WriteEnum((int) TypeSpecClass); + } + if (typeState_ != null) { + output.WriteRawTag(18); + output.WriteMessage(TypeState); + } + if (TypeSpecClassName.Length != 0) { + output.WriteRawTag(26); + output.WriteString(TypeSpecClassName); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (TypeSpecClass != global::Tensorflow.TypeSpecProto.Types.TypeSpecClass.Unknown) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) TypeSpecClass); + } + if (typeState_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(TypeState); + } + if (TypeSpecClassName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(TypeSpecClassName); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(TypeSpecProto other) { + if (other == null) { + return; + } + if (other.TypeSpecClass != global::Tensorflow.TypeSpecProto.Types.TypeSpecClass.Unknown) { + TypeSpecClass = other.TypeSpecClass; + } + if (other.typeState_ != null) { + if (typeState_ == null) { + TypeState = new global::Tensorflow.StructuredValue(); + } + TypeState.MergeFrom(other.TypeState); + } + if (other.TypeSpecClassName.Length != 0) { + TypeSpecClassName = other.TypeSpecClassName; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + TypeSpecClass = (global::Tensorflow.TypeSpecProto.Types.TypeSpecClass) input.ReadEnum(); + break; + } + case 18: { + if (typeState_ == null) { + TypeState = new global::Tensorflow.StructuredValue(); + } + input.ReadMessage(TypeState); + break; + } + case 26: { + TypeSpecClassName = input.ReadString(); + break; + } + } + } + } + + #region Nested types + /// Container for nested types declared in the TypeSpecProto message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static partial class Types { + public enum TypeSpecClass { + [pbr::OriginalName("UNKNOWN")] Unknown = 0, + /// + /// tf.SparseTensorSpec + /// + [pbr::OriginalName("SPARSE_TENSOR_SPEC")] SparseTensorSpec = 1, + /// + /// tf.IndexedSlicesSpec + /// + [pbr::OriginalName("INDEXED_SLICES_SPEC")] IndexedSlicesSpec = 2, + /// + /// tf.RaggedTensorSpec + /// + [pbr::OriginalName("RAGGED_TENSOR_SPEC")] RaggedTensorSpec = 3, + /// + /// tf.TensorArraySpec + /// + [pbr::OriginalName("TENSOR_ARRAY_SPEC")] TensorArraySpec = 4, + /// + /// tf.data.DatasetSpec + /// + [pbr::OriginalName("DATA_DATASET_SPEC")] DataDatasetSpec = 5, + /// + /// IteratorSpec from data/ops/iterator_ops.py + /// + [pbr::OriginalName("DATA_ITERATOR_SPEC")] DataIteratorSpec = 6, + /// + /// tf.OptionalSpec + /// + [pbr::OriginalName("OPTIONAL_SPEC")] OptionalSpec = 7, + /// + /// PerReplicaSpec from distribute/values.py + /// + [pbr::OriginalName("PER_REPLICA_SPEC")] PerReplicaSpec = 8, + /// + /// tf.VariableSpec + /// + [pbr::OriginalName("VARIABLE_SPEC")] VariableSpec = 9, + } + + } + #endregion + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/src/TensorFlowNET.Core/Protobuf/Summary.cs b/src/TensorFlowNET.Core/Protobuf/Summary.cs index 5528abae..4a7248c9 100644 --- a/src/TensorFlowNET.Core/Protobuf/Summary.cs +++ b/src/TensorFlowNET.Core/Protobuf/Summary.cs @@ -53,13 +53,13 @@ namespace Tensorflow { "b3Jr+AEBYgZwcm90bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Tensorflow.TensorReflection.Descriptor, }, - new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.SummaryDescription), global::Tensorflow.SummaryDescription.Parser, new[]{ "TypeHint" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.HistogramProto), global::Tensorflow.HistogramProto.Parser, new[]{ "Min", "Max", "Num", "Sum", "SumSquares", "BucketLimit", "Bucket" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.SummaryMetadata), global::Tensorflow.SummaryMetadata.Parser, new[]{ "PluginData", "DisplayName", "SummaryDescription" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.SummaryMetadata.Types.PluginData), global::Tensorflow.SummaryMetadata.Types.PluginData.Parser, new[]{ "PluginName", "Content" }, null, null, null)}), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Summary), global::Tensorflow.Summary.Parser, new[]{ "Value" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Summary.Types.Image), global::Tensorflow.Summary.Types.Image.Parser, new[]{ "Height", "Width", "Colorspace", "EncodedImageString" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Summary.Types.Audio), global::Tensorflow.Summary.Types.Audio.Parser, new[]{ "SampleRate", "NumChannels", "LengthFrames", "EncodedAudioString", "ContentType" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Summary.Types.Value), global::Tensorflow.Summary.Types.Value.Parser, new[]{ "NodeName", "Tag", "Metadata", "SimpleValue", "ObsoleteOldStyleHistogram", "Image", "Histo", "Audio", "Tensor" }, new[]{ "Value" }, null, null)}) + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.SummaryDescription), global::Tensorflow.SummaryDescription.Parser, new[]{ "TypeHint" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.HistogramProto), global::Tensorflow.HistogramProto.Parser, new[]{ "Min", "Max", "Num", "Sum", "SumSquares", "BucketLimit", "Bucket" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.SummaryMetadata), global::Tensorflow.SummaryMetadata.Parser, new[]{ "PluginData", "DisplayName", "SummaryDescription" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.SummaryMetadata.Types.PluginData), global::Tensorflow.SummaryMetadata.Types.PluginData.Parser, new[]{ "PluginName", "Content" }, null, null, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Summary), global::Tensorflow.Summary.Parser, new[]{ "Value" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Summary.Types.Image), global::Tensorflow.Summary.Types.Image.Parser, new[]{ "Height", "Width", "Colorspace", "EncodedImageString" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Summary.Types.Audio), global::Tensorflow.Summary.Types.Audio.Parser, new[]{ "SampleRate", "NumChannels", "LengthFrames", "EncodedAudioString", "ContentType" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Summary.Types.Value), global::Tensorflow.Summary.Types.Value.Parser, new[]{ "NodeName", "Tag", "Metadata", "SimpleValue", "ObsoleteOldStyleHistogram", "Image", "Histo", "Audio", "Tensor" }, new[]{ "Value" }, null, null, null)}) })); } #endregion @@ -658,7 +658,7 @@ namespace Tensorflow { } if (other.pluginData_ != null) { if (pluginData_ == null) { - pluginData_ = new global::Tensorflow.SummaryMetadata.Types.PluginData(); + PluginData = new global::Tensorflow.SummaryMetadata.Types.PluginData(); } PluginData.MergeFrom(other.PluginData); } @@ -681,9 +681,9 @@ namespace Tensorflow { break; case 10: { if (pluginData_ == null) { - pluginData_ = new global::Tensorflow.SummaryMetadata.Types.PluginData(); + PluginData = new global::Tensorflow.SummaryMetadata.Types.PluginData(); } - input.ReadMessage(pluginData_); + input.ReadMessage(PluginData); break; } case 18: { @@ -1824,7 +1824,7 @@ namespace Tensorflow { } if (other.metadata_ != null) { if (metadata_ == null) { - metadata_ = new global::Tensorflow.SummaryMetadata(); + Metadata = new global::Tensorflow.SummaryMetadata(); } Metadata.MergeFrom(other.Metadata); } @@ -1926,9 +1926,9 @@ namespace Tensorflow { } case 74: { if (metadata_ == null) { - metadata_ = new global::Tensorflow.SummaryMetadata(); + Metadata = new global::Tensorflow.SummaryMetadata(); } - input.ReadMessage(metadata_); + input.ReadMessage(Metadata); break; } } diff --git a/src/TensorFlowNET.Core/Protobuf/Tensor.cs b/src/TensorFlowNET.Core/Protobuf/Tensor.cs index daef3e19..d8a3d297 100644 --- a/src/TensorFlowNET.Core/Protobuf/Tensor.cs +++ b/src/TensorFlowNET.Core/Protobuf/Tensor.cs @@ -47,9 +47,9 @@ namespace Tensorflow { "c29yZmxvdy9nby9jb3JlL2ZyYW1ld29ya/gBAWIGcHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Tensorflow.ResourceHandleReflection.Descriptor, global::Tensorflow.TensorShapeReflection.Descriptor, global::Tensorflow.TypesReflection.Descriptor, }, - new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.TensorProto), global::Tensorflow.TensorProto.Parser, new[]{ "Dtype", "TensorShape", "VersionNumber", "TensorContent", "HalfVal", "FloatVal", "DoubleVal", "IntVal", "StringVal", "ScomplexVal", "Int64Val", "BoolVal", "DcomplexVal", "ResourceHandleVal", "VariantVal", "Uint32Val", "Uint64Val" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.VariantTensorDataProto), global::Tensorflow.VariantTensorDataProto.Parser, new[]{ "TypeName", "Metadata", "Tensors" }, null, null, null) + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.TensorProto), global::Tensorflow.TensorProto.Parser, new[]{ "Dtype", "TensorShape", "VersionNumber", "TensorContent", "HalfVal", "FloatVal", "DoubleVal", "IntVal", "StringVal", "ScomplexVal", "Int64Val", "BoolVal", "DcomplexVal", "ResourceHandleVal", "VariantVal", "Uint32Val", "Uint64Val" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.VariantTensorDataProto), global::Tensorflow.VariantTensorDataProto.Parser, new[]{ "TypeName", "Metadata", "Tensors" }, null, null, null, null) })); } #endregion @@ -111,7 +111,7 @@ namespace Tensorflow { /// Field number for the "dtype" field. public const int DtypeFieldNumber = 1; - private global::Tensorflow.DataType dtype_ = 0; + private global::Tensorflow.DataType dtype_ = global::Tensorflow.DataType.DtInvalid; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public global::Tensorflow.DataType Dtype { get { return dtype_; } @@ -378,7 +378,7 @@ namespace Tensorflow { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; - if (Dtype != 0) hash ^= Dtype.GetHashCode(); + if (Dtype != global::Tensorflow.DataType.DtInvalid) hash ^= Dtype.GetHashCode(); if (tensorShape_ != null) hash ^= TensorShape.GetHashCode(); if (VersionNumber != 0) hash ^= VersionNumber.GetHashCode(); if (TensorContent.Length != 0) hash ^= TensorContent.GetHashCode(); @@ -408,7 +408,7 @@ namespace Tensorflow { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void WriteTo(pb::CodedOutputStream output) { - if (Dtype != 0) { + if (Dtype != global::Tensorflow.DataType.DtInvalid) { output.WriteRawTag(8); output.WriteEnum((int) Dtype); } @@ -445,7 +445,7 @@ namespace Tensorflow { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int CalculateSize() { int size = 0; - if (Dtype != 0) { + if (Dtype != global::Tensorflow.DataType.DtInvalid) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Dtype); } if (tensorShape_ != null) { @@ -481,12 +481,12 @@ namespace Tensorflow { if (other == null) { return; } - if (other.Dtype != 0) { + if (other.Dtype != global::Tensorflow.DataType.DtInvalid) { Dtype = other.Dtype; } if (other.tensorShape_ != null) { if (tensorShape_ == null) { - tensorShape_ = new global::Tensorflow.TensorShapeProto(); + TensorShape = new global::Tensorflow.TensorShapeProto(); } TensorShape.MergeFrom(other.TensorShape); } @@ -521,14 +521,14 @@ namespace Tensorflow { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { - dtype_ = (global::Tensorflow.DataType) input.ReadEnum(); + Dtype = (global::Tensorflow.DataType) input.ReadEnum(); break; } case 18: { if (tensorShape_ == null) { - tensorShape_ = new global::Tensorflow.TensorShapeProto(); + TensorShape = new global::Tensorflow.TensorShapeProto(); } - input.ReadMessage(tensorShape_); + input.ReadMessage(TensorShape); break; } case 24: { diff --git a/src/TensorFlowNET.Core/Protobuf/TensorDescription.cs b/src/TensorFlowNET.Core/Protobuf/TensorDescription.cs index 4acb848b..ffe2e511 100644 --- a/src/TensorFlowNET.Core/Protobuf/TensorDescription.cs +++ b/src/TensorFlowNET.Core/Protobuf/TensorDescription.cs @@ -38,8 +38,8 @@ namespace Tensorflow { "AQFiBnByb3RvMw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Tensorflow.TypesReflection.Descriptor, global::Tensorflow.TensorShapeReflection.Descriptor, global::Tensorflow.AllocationDescriptionReflection.Descriptor, }, - new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.TensorDescription), global::Tensorflow.TensorDescription.Parser, new[]{ "Dtype", "Shape", "AllocationDescription" }, null, null, null) + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.TensorDescription), global::Tensorflow.TensorDescription.Parser, new[]{ "Dtype", "Shape", "AllocationDescription" }, null, null, null, null) })); } #endregion @@ -84,7 +84,7 @@ namespace Tensorflow { /// Field number for the "dtype" field. public const int DtypeFieldNumber = 1; - private global::Tensorflow.DataType dtype_ = 0; + private global::Tensorflow.DataType dtype_ = global::Tensorflow.DataType.DtInvalid; /// /// Data type of tensor elements /// @@ -146,7 +146,7 @@ namespace Tensorflow { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; - if (Dtype != 0) hash ^= Dtype.GetHashCode(); + if (Dtype != global::Tensorflow.DataType.DtInvalid) hash ^= Dtype.GetHashCode(); if (shape_ != null) hash ^= Shape.GetHashCode(); if (allocationDescription_ != null) hash ^= AllocationDescription.GetHashCode(); if (_unknownFields != null) { @@ -162,7 +162,7 @@ namespace Tensorflow { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void WriteTo(pb::CodedOutputStream output) { - if (Dtype != 0) { + if (Dtype != global::Tensorflow.DataType.DtInvalid) { output.WriteRawTag(8); output.WriteEnum((int) Dtype); } @@ -182,7 +182,7 @@ namespace Tensorflow { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int CalculateSize() { int size = 0; - if (Dtype != 0) { + if (Dtype != global::Tensorflow.DataType.DtInvalid) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Dtype); } if (shape_ != null) { @@ -202,18 +202,18 @@ namespace Tensorflow { if (other == null) { return; } - if (other.Dtype != 0) { + if (other.Dtype != global::Tensorflow.DataType.DtInvalid) { Dtype = other.Dtype; } if (other.shape_ != null) { if (shape_ == null) { - shape_ = new global::Tensorflow.TensorShapeProto(); + Shape = new global::Tensorflow.TensorShapeProto(); } Shape.MergeFrom(other.Shape); } if (other.allocationDescription_ != null) { if (allocationDescription_ == null) { - allocationDescription_ = new global::Tensorflow.AllocationDescription(); + AllocationDescription = new global::Tensorflow.AllocationDescription(); } AllocationDescription.MergeFrom(other.AllocationDescription); } @@ -229,21 +229,21 @@ namespace Tensorflow { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { - dtype_ = (global::Tensorflow.DataType) input.ReadEnum(); + Dtype = (global::Tensorflow.DataType) input.ReadEnum(); break; } case 18: { if (shape_ == null) { - shape_ = new global::Tensorflow.TensorShapeProto(); + Shape = new global::Tensorflow.TensorShapeProto(); } - input.ReadMessage(shape_); + input.ReadMessage(Shape); break; } case 34: { if (allocationDescription_ == null) { - allocationDescription_ = new global::Tensorflow.AllocationDescription(); + AllocationDescription = new global::Tensorflow.AllocationDescription(); } - input.ReadMessage(allocationDescription_); + input.ReadMessage(AllocationDescription); break; } } diff --git a/src/TensorFlowNET.Core/Protobuf/TensorShape.cs b/src/TensorFlowNET.Core/Protobuf/TensorShape.cs index 0a891dd0..fb275568 100644 --- a/src/TensorFlowNET.Core/Protobuf/TensorShape.cs +++ b/src/TensorFlowNET.Core/Protobuf/TensorShape.cs @@ -1,6 +1,6 @@ // // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensor_shape.proto +// source: tensorflow/core/framework/tensor_shape.proto // #pragma warning disable 1591, 0612, 3021 #region Designer generated code @@ -11,11 +11,11 @@ using pbr = global::Google.Protobuf.Reflection; using scg = global::System.Collections.Generic; namespace Tensorflow { - /// Holder for reflection information generated from tensor_shape.proto + /// Holder for reflection information generated from tensorflow/core/framework/tensor_shape.proto public static partial class TensorShapeReflection { #region Descriptor - /// File descriptor for tensor_shape.proto + /// File descriptor for tensorflow/core/framework/tensor_shape.proto public static pbr::FileDescriptor Descriptor { get { return descriptor; } } @@ -24,17 +24,17 @@ namespace Tensorflow { static TensorShapeReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( - "ChJ0ZW5zb3Jfc2hhcGUucHJvdG8SCnRlbnNvcmZsb3ciegoQVGVuc29yU2hh", - "cGVQcm90bxItCgNkaW0YAiADKAsyIC50ZW5zb3JmbG93LlRlbnNvclNoYXBl", - "UHJvdG8uRGltEhQKDHVua25vd25fcmFuaxgDIAEoCBohCgNEaW0SDAoEc2l6", - "ZRgBIAEoAxIMCgRuYW1lGAIgASgJQnEKGG9yZy50ZW5zb3JmbG93LmZyYW1l", - "d29ya0IRVGVuc29yU2hhcGVQcm90b3NQAVo9Z2l0aHViLmNvbS90ZW5zb3Jm", - "bG93L3RlbnNvcmZsb3cvdGVuc29yZmxvdy9nby9jb3JlL2ZyYW1ld29ya/gB", - "AWIGcHJvdG8z")); + "Cix0ZW5zb3JmbG93L2NvcmUvZnJhbWV3b3JrL3RlbnNvcl9zaGFwZS5wcm90", + "bxIKdGVuc29yZmxvdyJ6ChBUZW5zb3JTaGFwZVByb3RvEi0KA2RpbRgCIAMo", + "CzIgLnRlbnNvcmZsb3cuVGVuc29yU2hhcGVQcm90by5EaW0SFAoMdW5rbm93", + "bl9yYW5rGAMgASgIGiEKA0RpbRIMCgRzaXplGAEgASgDEgwKBG5hbWUYAiAB", + "KAlCcQoYb3JnLnRlbnNvcmZsb3cuZnJhbWV3b3JrQhFUZW5zb3JTaGFwZVBy", + "b3Rvc1ABWj1naXRodWIuY29tL3RlbnNvcmZsb3cvdGVuc29yZmxvdy90ZW5z", + "b3JmbG93L2dvL2NvcmUvZnJhbWV3b3Jr+AEBYgZwcm90bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, - new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.TensorShapeProto), global::Tensorflow.TensorShapeProto.Parser, new[]{ "Dim", "UnknownRank" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.TensorShapeProto.Types.Dim), global::Tensorflow.TensorShapeProto.Types.Dim.Parser, new[]{ "Size", "Name" }, null, null, null)}) + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.TensorShapeProto), global::Tensorflow.TensorShapeProto.Parser, new[]{ "Dim", "UnknownRank" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.TensorShapeProto.Types.Dim), global::Tensorflow.TensorShapeProto.Types.Dim.Parser, new[]{ "Size", "Name" }, null, null, null, null)}) })); } #endregion diff --git a/src/TensorFlowNET.Core/Protobuf/TensorSlice.cs b/src/TensorFlowNET.Core/Protobuf/TensorSlice.cs index 8efa1216..06b2e12a 100644 --- a/src/TensorFlowNET.Core/Protobuf/TensorSlice.cs +++ b/src/TensorFlowNET.Core/Protobuf/TensorSlice.cs @@ -33,8 +33,8 @@ namespace Tensorflow { "b3cvdGVuc29yZmxvdy9nby9jb3JlL2ZyYW1ld29ya/gBAWIGcHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, - new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.TensorSliceProto), global::Tensorflow.TensorSliceProto.Parser, new[]{ "Extent" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.TensorSliceProto.Types.Extent), global::Tensorflow.TensorSliceProto.Types.Extent.Parser, new[]{ "Start", "Length" }, new[]{ "HasLength" }, null, null)}) + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.TensorSliceProto), global::Tensorflow.TensorSliceProto.Parser, new[]{ "Extent" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.TensorSliceProto.Types.Extent), global::Tensorflow.TensorSliceProto.Types.Extent.Parser, new[]{ "Start", "Length" }, new[]{ "HasLength" }, null, null, null)}) })); } #endregion diff --git a/src/TensorFlowNET.Core/Protobuf/TrackableObjectGraph.cs b/src/TensorFlowNET.Core/Protobuf/TrackableObjectGraph.cs new file mode 100644 index 00000000..97cd0027 --- /dev/null +++ b/src/TensorFlowNET.Core/Protobuf/TrackableObjectGraph.cs @@ -0,0 +1,957 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/trackable_object_graph.proto +// +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tensorflow { + + /// Holder for reflection information generated from tensorflow/core/protobuf/trackable_object_graph.proto + public static partial class TrackableObjectGraphReflection { + + #region Descriptor + /// File descriptor for tensorflow/core/protobuf/trackable_object_graph.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static TrackableObjectGraphReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CjV0ZW5zb3JmbG93L2NvcmUvcHJvdG9idWYvdHJhY2thYmxlX29iamVjdF9n", + "cmFwaC5wcm90bxIKdGVuc29yZmxvdyKDBQoUVHJhY2thYmxlT2JqZWN0R3Jh", + "cGgSPwoFbm9kZXMYASADKAsyMC50ZW5zb3JmbG93LlRyYWNrYWJsZU9iamVj", + "dEdyYXBoLlRyYWNrYWJsZU9iamVjdBqpBAoPVHJhY2thYmxlT2JqZWN0ElIK", + "CGNoaWxkcmVuGAEgAygLMkAudGVuc29yZmxvdy5UcmFja2FibGVPYmplY3RH", + "cmFwaC5UcmFja2FibGVPYmplY3QuT2JqZWN0UmVmZXJlbmNlElUKCmF0dHJp", + "YnV0ZXMYAiADKAsyQS50ZW5zb3JmbG93LlRyYWNrYWJsZU9iamVjdEdyYXBo", + "LlRyYWNrYWJsZU9iamVjdC5TZXJpYWxpemVkVGVuc29yEl4KDnNsb3RfdmFy", + "aWFibGVzGAMgAygLMkYudGVuc29yZmxvdy5UcmFja2FibGVPYmplY3RHcmFw", + "aC5UcmFja2FibGVPYmplY3QuU2xvdFZhcmlhYmxlUmVmZXJlbmNlGjYKD09i", + "amVjdFJlZmVyZW5jZRIPCgdub2RlX2lkGAEgASgFEhIKCmxvY2FsX25hbWUY", + "AiABKAkaZQoQU2VyaWFsaXplZFRlbnNvchIMCgRuYW1lGAEgASgJEhEKCWZ1", + "bGxfbmFtZRgCIAEoCRIWCg5jaGVja3BvaW50X2tleRgDIAEoCRIYChBvcHRp", + "b25hbF9yZXN0b3JlGAQgASgIGmwKFVNsb3RWYXJpYWJsZVJlZmVyZW5jZRIh", + "ChlvcmlnaW5hbF92YXJpYWJsZV9ub2RlX2lkGAEgASgFEhEKCXNsb3RfbmFt", + "ZRgCIAEoCRIdChVzbG90X3ZhcmlhYmxlX25vZGVfaWQYAyABKAVCA/gBAWIG", + "cHJvdG8z")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.TrackableObjectGraph), global::Tensorflow.TrackableObjectGraph.Parser, new[]{ "Nodes" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.TrackableObjectGraph.Types.TrackableObject), global::Tensorflow.TrackableObjectGraph.Types.TrackableObject.Parser, new[]{ "Children", "Attributes", "SlotVariables" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.TrackableObjectGraph.Types.TrackableObject.Types.ObjectReference), global::Tensorflow.TrackableObjectGraph.Types.TrackableObject.Types.ObjectReference.Parser, new[]{ "NodeId", "LocalName" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.TrackableObjectGraph.Types.TrackableObject.Types.SerializedTensor), global::Tensorflow.TrackableObjectGraph.Types.TrackableObject.Types.SerializedTensor.Parser, new[]{ "Name", "FullName", "CheckpointKey", "OptionalRestore" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.TrackableObjectGraph.Types.TrackableObject.Types.SlotVariableReference), global::Tensorflow.TrackableObjectGraph.Types.TrackableObject.Types.SlotVariableReference.Parser, new[]{ "OriginalVariableNodeId", "SlotName", "SlotVariableNodeId" }, null, null, null, null)})}) + })); + } + #endregion + + } + #region Messages + public sealed partial class TrackableObjectGraph : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TrackableObjectGraph()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.TrackableObjectGraphReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public TrackableObjectGraph() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public TrackableObjectGraph(TrackableObjectGraph other) : this() { + nodes_ = other.nodes_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public TrackableObjectGraph Clone() { + return new TrackableObjectGraph(this); + } + + /// Field number for the "nodes" field. + public const int NodesFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_nodes_codec + = pb::FieldCodec.ForMessage(10, global::Tensorflow.TrackableObjectGraph.Types.TrackableObject.Parser); + private readonly pbc::RepeatedField nodes_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField Nodes { + get { return nodes_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as TrackableObjectGraph); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(TrackableObjectGraph other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!nodes_.Equals(other.nodes_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + hash ^= nodes_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + nodes_.WriteTo(output, _repeated_nodes_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + size += nodes_.CalculateSize(_repeated_nodes_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(TrackableObjectGraph other) { + if (other == null) { + return; + } + nodes_.Add(other.nodes_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + nodes_.AddEntriesFrom(input, _repeated_nodes_codec); + break; + } + } + } + } + + #region Nested types + /// Container for nested types declared in the TrackableObjectGraph message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static partial class Types { + public sealed partial class TrackableObject : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TrackableObject()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.TrackableObjectGraph.Descriptor.NestedTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public TrackableObject() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public TrackableObject(TrackableObject other) : this() { + children_ = other.children_.Clone(); + attributes_ = other.attributes_.Clone(); + slotVariables_ = other.slotVariables_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public TrackableObject Clone() { + return new TrackableObject(this); + } + + /// Field number for the "children" field. + public const int ChildrenFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_children_codec + = pb::FieldCodec.ForMessage(10, global::Tensorflow.TrackableObjectGraph.Types.TrackableObject.Types.ObjectReference.Parser); + private readonly pbc::RepeatedField children_ = new pbc::RepeatedField(); + /// + /// Objects which this object depends on. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField Children { + get { return children_; } + } + + /// Field number for the "attributes" field. + public const int AttributesFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_attributes_codec + = pb::FieldCodec.ForMessage(18, global::Tensorflow.TrackableObjectGraph.Types.TrackableObject.Types.SerializedTensor.Parser); + private readonly pbc::RepeatedField attributes_ = new pbc::RepeatedField(); + /// + /// Serialized data specific to this object. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField Attributes { + get { return attributes_; } + } + + /// Field number for the "slot_variables" field. + public const int SlotVariablesFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_slotVariables_codec + = pb::FieldCodec.ForMessage(26, global::Tensorflow.TrackableObjectGraph.Types.TrackableObject.Types.SlotVariableReference.Parser); + private readonly pbc::RepeatedField slotVariables_ = new pbc::RepeatedField(); + /// + /// Slot variables owned by this object. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField SlotVariables { + get { return slotVariables_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as TrackableObject); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(TrackableObject other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!children_.Equals(other.children_)) return false; + if(!attributes_.Equals(other.attributes_)) return false; + if(!slotVariables_.Equals(other.slotVariables_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + hash ^= children_.GetHashCode(); + hash ^= attributes_.GetHashCode(); + hash ^= slotVariables_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + children_.WriteTo(output, _repeated_children_codec); + attributes_.WriteTo(output, _repeated_attributes_codec); + slotVariables_.WriteTo(output, _repeated_slotVariables_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + size += children_.CalculateSize(_repeated_children_codec); + size += attributes_.CalculateSize(_repeated_attributes_codec); + size += slotVariables_.CalculateSize(_repeated_slotVariables_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(TrackableObject other) { + if (other == null) { + return; + } + children_.Add(other.children_); + attributes_.Add(other.attributes_); + slotVariables_.Add(other.slotVariables_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + children_.AddEntriesFrom(input, _repeated_children_codec); + break; + } + case 18: { + attributes_.AddEntriesFrom(input, _repeated_attributes_codec); + break; + } + case 26: { + slotVariables_.AddEntriesFrom(input, _repeated_slotVariables_codec); + break; + } + } + } + } + + #region Nested types + /// Container for nested types declared in the TrackableObject message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static partial class Types { + public sealed partial class ObjectReference : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ObjectReference()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.TrackableObjectGraph.Types.TrackableObject.Descriptor.NestedTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ObjectReference() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ObjectReference(ObjectReference other) : this() { + nodeId_ = other.nodeId_; + localName_ = other.localName_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ObjectReference Clone() { + return new ObjectReference(this); + } + + /// Field number for the "node_id" field. + public const int NodeIdFieldNumber = 1; + private int nodeId_; + /// + /// An index into `TrackableObjectGraph.nodes`, indicating the object + /// being referenced. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int NodeId { + get { return nodeId_; } + set { + nodeId_ = value; + } + } + + /// Field number for the "local_name" field. + public const int LocalNameFieldNumber = 2; + private string localName_ = ""; + /// + /// A user-provided name for the edge. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string LocalName { + get { return localName_; } + set { + localName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as ObjectReference); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(ObjectReference other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (NodeId != other.NodeId) return false; + if (LocalName != other.LocalName) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (NodeId != 0) hash ^= NodeId.GetHashCode(); + if (LocalName.Length != 0) hash ^= LocalName.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (NodeId != 0) { + output.WriteRawTag(8); + output.WriteInt32(NodeId); + } + if (LocalName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(LocalName); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (NodeId != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(NodeId); + } + if (LocalName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(LocalName); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(ObjectReference other) { + if (other == null) { + return; + } + if (other.NodeId != 0) { + NodeId = other.NodeId; + } + if (other.LocalName.Length != 0) { + LocalName = other.LocalName; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + NodeId = input.ReadInt32(); + break; + } + case 18: { + LocalName = input.ReadString(); + break; + } + } + } + } + + } + + public sealed partial class SerializedTensor : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SerializedTensor()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.TrackableObjectGraph.Types.TrackableObject.Descriptor.NestedTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SerializedTensor() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SerializedTensor(SerializedTensor other) : this() { + name_ = other.name_; + fullName_ = other.fullName_; + checkpointKey_ = other.checkpointKey_; + optionalRestore_ = other.optionalRestore_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SerializedTensor Clone() { + return new SerializedTensor(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// A name for the Tensor. Simple variables have only one + /// `SerializedTensor` named "VARIABLE_VALUE" by convention. This value may + /// be restored on object creation as an optimization. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "full_name" field. + public const int FullNameFieldNumber = 2; + private string fullName_ = ""; + /// + /// The full name of the variable/tensor, if applicable. Used to allow + /// name-based loading of checkpoints which were saved using an + /// object-based API. Should match the checkpoint key which would have been + /// assigned by tf.train.Saver. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string FullName { + get { return fullName_; } + set { + fullName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "checkpoint_key" field. + public const int CheckpointKeyFieldNumber = 3; + private string checkpointKey_ = ""; + /// + /// The generated name of the Tensor in the checkpoint. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string CheckpointKey { + get { return checkpointKey_; } + set { + checkpointKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "optional_restore" field. + public const int OptionalRestoreFieldNumber = 4; + private bool optionalRestore_; + /// + /// Whether checkpoints should be considered as matching even without this + /// value restored. Used for non-critical values which don't affect the + /// TensorFlow graph, such as layer configurations. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool OptionalRestore { + get { return optionalRestore_; } + set { + optionalRestore_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as SerializedTensor); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(SerializedTensor other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if (FullName != other.FullName) return false; + if (CheckpointKey != other.CheckpointKey) return false; + if (OptionalRestore != other.OptionalRestore) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (FullName.Length != 0) hash ^= FullName.GetHashCode(); + if (CheckpointKey.Length != 0) hash ^= CheckpointKey.GetHashCode(); + if (OptionalRestore != false) hash ^= OptionalRestore.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (FullName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(FullName); + } + if (CheckpointKey.Length != 0) { + output.WriteRawTag(26); + output.WriteString(CheckpointKey); + } + if (OptionalRestore != false) { + output.WriteRawTag(32); + output.WriteBool(OptionalRestore); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (FullName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(FullName); + } + if (CheckpointKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(CheckpointKey); + } + if (OptionalRestore != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(SerializedTensor other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.FullName.Length != 0) { + FullName = other.FullName; + } + if (other.CheckpointKey.Length != 0) { + CheckpointKey = other.CheckpointKey; + } + if (other.OptionalRestore != false) { + OptionalRestore = other.OptionalRestore; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + FullName = input.ReadString(); + break; + } + case 26: { + CheckpointKey = input.ReadString(); + break; + } + case 32: { + OptionalRestore = input.ReadBool(); + break; + } + } + } + } + + } + + public sealed partial class SlotVariableReference : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SlotVariableReference()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.TrackableObjectGraph.Types.TrackableObject.Descriptor.NestedTypes[2]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SlotVariableReference() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SlotVariableReference(SlotVariableReference other) : this() { + originalVariableNodeId_ = other.originalVariableNodeId_; + slotName_ = other.slotName_; + slotVariableNodeId_ = other.slotVariableNodeId_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SlotVariableReference Clone() { + return new SlotVariableReference(this); + } + + /// Field number for the "original_variable_node_id" field. + public const int OriginalVariableNodeIdFieldNumber = 1; + private int originalVariableNodeId_; + /// + /// An index into `TrackableObjectGraph.nodes`, indicating the + /// variable object this slot was created for. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int OriginalVariableNodeId { + get { return originalVariableNodeId_; } + set { + originalVariableNodeId_ = value; + } + } + + /// Field number for the "slot_name" field. + public const int SlotNameFieldNumber = 2; + private string slotName_ = ""; + /// + /// The name of the slot (e.g. "m"/"v"). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string SlotName { + get { return slotName_; } + set { + slotName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "slot_variable_node_id" field. + public const int SlotVariableNodeIdFieldNumber = 3; + private int slotVariableNodeId_; + /// + /// An index into `TrackableObjectGraph.nodes`, indicating the + /// `Object` with the value of the slot variable. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int SlotVariableNodeId { + get { return slotVariableNodeId_; } + set { + slotVariableNodeId_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as SlotVariableReference); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(SlotVariableReference other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (OriginalVariableNodeId != other.OriginalVariableNodeId) return false; + if (SlotName != other.SlotName) return false; + if (SlotVariableNodeId != other.SlotVariableNodeId) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (OriginalVariableNodeId != 0) hash ^= OriginalVariableNodeId.GetHashCode(); + if (SlotName.Length != 0) hash ^= SlotName.GetHashCode(); + if (SlotVariableNodeId != 0) hash ^= SlotVariableNodeId.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (OriginalVariableNodeId != 0) { + output.WriteRawTag(8); + output.WriteInt32(OriginalVariableNodeId); + } + if (SlotName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(SlotName); + } + if (SlotVariableNodeId != 0) { + output.WriteRawTag(24); + output.WriteInt32(SlotVariableNodeId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (OriginalVariableNodeId != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(OriginalVariableNodeId); + } + if (SlotName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(SlotName); + } + if (SlotVariableNodeId != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(SlotVariableNodeId); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(SlotVariableReference other) { + if (other == null) { + return; + } + if (other.OriginalVariableNodeId != 0) { + OriginalVariableNodeId = other.OriginalVariableNodeId; + } + if (other.SlotName.Length != 0) { + SlotName = other.SlotName; + } + if (other.SlotVariableNodeId != 0) { + SlotVariableNodeId = other.SlotVariableNodeId; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + OriginalVariableNodeId = input.ReadInt32(); + break; + } + case 18: { + SlotName = input.ReadString(); + break; + } + case 24: { + SlotVariableNodeId = input.ReadInt32(); + break; + } + } + } + } + + } + + } + #endregion + + } + + } + #endregion + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/src/TensorFlowNET.Core/Protobuf/Types.cs b/src/TensorFlowNET.Core/Protobuf/Types.cs index 095635d2..e21e4614 100644 --- a/src/TensorFlowNET.Core/Protobuf/Types.cs +++ b/src/TensorFlowNET.Core/Protobuf/Types.cs @@ -48,13 +48,14 @@ namespace Tensorflow { "c29yZmxvdy9nby9jb3JlL2ZyYW1ld29ya/gBAWIGcHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, - new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Tensorflow.DataType), }, null)); + new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Tensorflow.DataType), }, null, null)); } #endregion } #region Enums /// + /// (== suppress_warning documentation-presence ==) /// LINT.IfChange /// public enum DataType { diff --git a/src/TensorFlowNET.Core/Protobuf/Variable.cs b/src/TensorFlowNET.Core/Protobuf/Variable.cs index 9f24c138..b6548acb 100644 --- a/src/TensorFlowNET.Core/Protobuf/Variable.cs +++ b/src/TensorFlowNET.Core/Protobuf/Variable.cs @@ -42,13 +42,14 @@ namespace Tensorflow { "ZWdhdGlvbhIdChlWQVJJQUJMRV9BR0dSRUdBVElPTl9OT05FEAASHAoYVkFS", "SUFCTEVfQUdHUkVHQVRJT05fU1VNEAESHQoZVkFSSUFCTEVfQUdHUkVHQVRJ", "T05fTUVBThACEisKJ1ZBUklBQkxFX0FHR1JFR0FUSU9OX09OTFlfRklSU1Rf", - "UkVQTElDQRADQi8KGG9yZy50ZW5zb3JmbG93LmZyYW1ld29ya0IOVmFyaWFi", - "bGVQcm90b3NQAfgBAWIGcHJvdG8z")); + "UkVQTElDQRADQm4KGG9yZy50ZW5zb3JmbG93LmZyYW1ld29ya0IOVmFyaWFi", + "bGVQcm90b3NQAVo9Z2l0aHViLmNvbS90ZW5zb3JmbG93L3RlbnNvcmZsb3cv", + "dGVuc29yZmxvdy9nby9jb3JlL2ZyYW1ld29ya/gBAWIGcHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, - new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Tensorflow.VariableSynchronization), typeof(global::Tensorflow.VariableAggregation), }, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.VariableDef), global::Tensorflow.VariableDef.Parser, new[]{ "VariableName", "InitialValueName", "InitializerName", "SnapshotName", "SaveSliceInfoDef", "IsResource", "Trainable", "Synchronization", "Aggregation" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.SaveSliceInfoDef), global::Tensorflow.SaveSliceInfoDef.Parser, new[]{ "FullName", "FullShape", "VarOffset", "VarShape" }, null, null, null) + new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Tensorflow.VariableSynchronization), typeof(global::Tensorflow.VariableAggregation), }, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.VariableDef), global::Tensorflow.VariableDef.Parser, new[]{ "VariableName", "InitialValueName", "InitializerName", "SnapshotName", "SaveSliceInfoDef", "IsResource", "Trainable", "Synchronization", "Aggregation" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.SaveSliceInfoDef), global::Tensorflow.SaveSliceInfoDef.Parser, new[]{ "FullName", "FullShape", "VarOffset", "VarShape" }, null, null, null, null) })); } #endregion @@ -257,7 +258,7 @@ namespace Tensorflow { /// Field number for the "synchronization" field. public const int SynchronizationFieldNumber = 8; - private global::Tensorflow.VariableSynchronization synchronization_ = 0; + private global::Tensorflow.VariableSynchronization synchronization_ = global::Tensorflow.VariableSynchronization.Auto; /// /// Indicates when a distributed variable will be synced. /// @@ -271,7 +272,7 @@ namespace Tensorflow { /// Field number for the "aggregation" field. public const int AggregationFieldNumber = 9; - private global::Tensorflow.VariableAggregation aggregation_ = 0; + private global::Tensorflow.VariableAggregation aggregation_ = global::Tensorflow.VariableAggregation.None; /// /// Indicates how a distributed variable will be aggregated. /// @@ -318,8 +319,8 @@ namespace Tensorflow { if (saveSliceInfoDef_ != null) hash ^= SaveSliceInfoDef.GetHashCode(); if (IsResource != false) hash ^= IsResource.GetHashCode(); if (Trainable != false) hash ^= Trainable.GetHashCode(); - if (Synchronization != 0) hash ^= Synchronization.GetHashCode(); - if (Aggregation != 0) hash ^= Aggregation.GetHashCode(); + if (Synchronization != global::Tensorflow.VariableSynchronization.Auto) hash ^= Synchronization.GetHashCode(); + if (Aggregation != global::Tensorflow.VariableAggregation.None) hash ^= Aggregation.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -361,11 +362,11 @@ namespace Tensorflow { output.WriteRawTag(56); output.WriteBool(Trainable); } - if (Synchronization != 0) { + if (Synchronization != global::Tensorflow.VariableSynchronization.Auto) { output.WriteRawTag(64); output.WriteEnum((int) Synchronization); } - if (Aggregation != 0) { + if (Aggregation != global::Tensorflow.VariableAggregation.None) { output.WriteRawTag(72); output.WriteEnum((int) Aggregation); } @@ -398,10 +399,10 @@ namespace Tensorflow { if (Trainable != false) { size += 1 + 1; } - if (Synchronization != 0) { + if (Synchronization != global::Tensorflow.VariableSynchronization.Auto) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Synchronization); } - if (Aggregation != 0) { + if (Aggregation != global::Tensorflow.VariableAggregation.None) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Aggregation); } if (_unknownFields != null) { @@ -429,7 +430,7 @@ namespace Tensorflow { } if (other.saveSliceInfoDef_ != null) { if (saveSliceInfoDef_ == null) { - saveSliceInfoDef_ = new global::Tensorflow.SaveSliceInfoDef(); + SaveSliceInfoDef = new global::Tensorflow.SaveSliceInfoDef(); } SaveSliceInfoDef.MergeFrom(other.SaveSliceInfoDef); } @@ -439,10 +440,10 @@ namespace Tensorflow { if (other.Trainable != false) { Trainable = other.Trainable; } - if (other.Synchronization != 0) { + if (other.Synchronization != global::Tensorflow.VariableSynchronization.Auto) { Synchronization = other.Synchronization; } - if (other.Aggregation != 0) { + if (other.Aggregation != global::Tensorflow.VariableAggregation.None) { Aggregation = other.Aggregation; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); @@ -470,9 +471,9 @@ namespace Tensorflow { } case 34: { if (saveSliceInfoDef_ == null) { - saveSliceInfoDef_ = new global::Tensorflow.SaveSliceInfoDef(); + SaveSliceInfoDef = new global::Tensorflow.SaveSliceInfoDef(); } - input.ReadMessage(saveSliceInfoDef_); + input.ReadMessage(SaveSliceInfoDef); break; } case 40: { @@ -488,11 +489,11 @@ namespace Tensorflow { break; } case 64: { - synchronization_ = (global::Tensorflow.VariableSynchronization) input.ReadEnum(); + Synchronization = (global::Tensorflow.VariableSynchronization) input.ReadEnum(); break; } case 72: { - aggregation_ = (global::Tensorflow.VariableAggregation) input.ReadEnum(); + Aggregation = (global::Tensorflow.VariableAggregation) input.ReadEnum(); break; } } diff --git a/src/TensorFlowNET.Core/Protobuf/VerifierConfig.cs b/src/TensorFlowNET.Core/Protobuf/VerifierConfig.cs new file mode 100644 index 00000000..738fc147 --- /dev/null +++ b/src/TensorFlowNET.Core/Protobuf/VerifierConfig.cs @@ -0,0 +1,229 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/verifier_config.proto +// +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tensorflow { + + /// Holder for reflection information generated from tensorflow/core/protobuf/verifier_config.proto + public static partial class VerifierConfigReflection { + + #region Descriptor + /// File descriptor for tensorflow/core/protobuf/verifier_config.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static VerifierConfigReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Ci50ZW5zb3JmbG93L2NvcmUvcHJvdG9idWYvdmVyaWZpZXJfY29uZmlnLnBy", + "b3RvEgp0ZW5zb3JmbG93IpsBCg5WZXJpZmllckNvbmZpZxIiChp2ZXJpZmlj", + "YXRpb25fdGltZW91dF9pbl9tcxgBIAEoAxI9ChJzdHJ1Y3R1cmVfdmVyaWZp", + "ZXIYAiABKA4yIS50ZW5zb3JmbG93LlZlcmlmaWVyQ29uZmlnLlRvZ2dsZSIm", + "CgZUb2dnbGUSCwoHREVGQVVMVBAAEgYKAk9OEAESBwoDT0ZGEAJCcwoYb3Jn", + "LnRlbnNvcmZsb3cuZnJhbWV3b3JrQhRWZXJpZmllckNvbmZpZ1Byb3Rvc1AB", + "WjxnaXRodWIuY29tL3RlbnNvcmZsb3cvdGVuc29yZmxvdy90ZW5zb3JmbG93", + "L2dvL2NvcmUvcHJvdG9idWb4AQFiBnByb3RvMw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.VerifierConfig), global::Tensorflow.VerifierConfig.Parser, new[]{ "VerificationTimeoutInMs", "StructureVerifier" }, null, new[]{ typeof(global::Tensorflow.VerifierConfig.Types.Toggle) }, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// The config for graph verifiers. + /// + public sealed partial class VerifierConfig : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new VerifierConfig()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.VerifierConfigReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public VerifierConfig() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public VerifierConfig(VerifierConfig other) : this() { + verificationTimeoutInMs_ = other.verificationTimeoutInMs_; + structureVerifier_ = other.structureVerifier_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public VerifierConfig Clone() { + return new VerifierConfig(this); + } + + /// Field number for the "verification_timeout_in_ms" field. + public const int VerificationTimeoutInMsFieldNumber = 1; + private long verificationTimeoutInMs_; + /// + /// Deadline for completion of all verification i.e. all the Toggle ON + /// verifiers must complete execution within this time. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public long VerificationTimeoutInMs { + get { return verificationTimeoutInMs_; } + set { + verificationTimeoutInMs_ = value; + } + } + + /// Field number for the "structure_verifier" field. + public const int StructureVerifierFieldNumber = 2; + private global::Tensorflow.VerifierConfig.Types.Toggle structureVerifier_ = global::Tensorflow.VerifierConfig.Types.Toggle.Default; + /// + /// Perform structural validation on a tensorflow graph. Default is OFF. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.VerifierConfig.Types.Toggle StructureVerifier { + get { return structureVerifier_; } + set { + structureVerifier_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as VerifierConfig); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(VerifierConfig other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (VerificationTimeoutInMs != other.VerificationTimeoutInMs) return false; + if (StructureVerifier != other.StructureVerifier) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (VerificationTimeoutInMs != 0L) hash ^= VerificationTimeoutInMs.GetHashCode(); + if (StructureVerifier != global::Tensorflow.VerifierConfig.Types.Toggle.Default) hash ^= StructureVerifier.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (VerificationTimeoutInMs != 0L) { + output.WriteRawTag(8); + output.WriteInt64(VerificationTimeoutInMs); + } + if (StructureVerifier != global::Tensorflow.VerifierConfig.Types.Toggle.Default) { + output.WriteRawTag(16); + output.WriteEnum((int) StructureVerifier); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (VerificationTimeoutInMs != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(VerificationTimeoutInMs); + } + if (StructureVerifier != global::Tensorflow.VerifierConfig.Types.Toggle.Default) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) StructureVerifier); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(VerifierConfig other) { + if (other == null) { + return; + } + if (other.VerificationTimeoutInMs != 0L) { + VerificationTimeoutInMs = other.VerificationTimeoutInMs; + } + if (other.StructureVerifier != global::Tensorflow.VerifierConfig.Types.Toggle.Default) { + StructureVerifier = other.StructureVerifier; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + VerificationTimeoutInMs = input.ReadInt64(); + break; + } + case 16: { + StructureVerifier = (global::Tensorflow.VerifierConfig.Types.Toggle) input.ReadEnum(); + break; + } + } + } + } + + #region Nested types + /// Container for nested types declared in the VerifierConfig message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static partial class Types { + public enum Toggle { + [pbr::OriginalName("DEFAULT")] Default = 0, + [pbr::OriginalName("ON")] On = 1, + [pbr::OriginalName("OFF")] Off = 2, + } + + } + #endregion + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/src/TensorFlowNET.Core/Protobuf/Versions.cs b/src/TensorFlowNET.Core/Protobuf/Versions.cs index c00b1232..d98b4e12 100644 --- a/src/TensorFlowNET.Core/Protobuf/Versions.cs +++ b/src/TensorFlowNET.Core/Protobuf/Versions.cs @@ -32,8 +32,8 @@ namespace Tensorflow { "L2NvcmUvZnJhbWV3b3Jr+AEBYgZwcm90bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, - new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.VersionDef), global::Tensorflow.VersionDef.Parser, new[]{ "Producer", "MinConsumer", "BadConsumers" }, null, null, null) + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.VersionDef), global::Tensorflow.VersionDef.Parser, new[]{ "Producer", "MinConsumer", "BadConsumers" }, null, null, null, null) })); } #endregion diff --git a/src/TensorFlowNET.Core/TensorFlow.Binding.csproj b/src/TensorFlowNET.Core/TensorFlow.Binding.csproj index ed66191a..09159483 100644 --- a/src/TensorFlowNET.Core/TensorFlow.Binding.csproj +++ b/src/TensorFlowNET.Core/TensorFlow.Binding.csproj @@ -31,9 +31,16 @@ https://tensorflownet.readthedocs.io true true Open.snk + AnyCPU;x64 + true + TRACE;DEBUG;SERIALIZABLE_ + AnyCPU + + + true TRACE;DEBUG;SERIALIZABLE_ x64 @@ -43,6 +50,10 @@ https://tensorflownet.readthedocs.io true + + true + + diff --git a/src/TensorFlowNET.Core/Tensors/Tensor.Value.cs b/src/TensorFlowNET.Core/Tensors/Tensor.Value.cs index 24fccebc..c4251e28 100644 --- a/src/TensorFlowNET.Core/Tensors/Tensor.Value.cs +++ b/src/TensorFlowNET.Core/Tensors/Tensor.Value.cs @@ -169,6 +169,8 @@ namespace Tensorflow return (NDArray)StringData()[0]; case TF_DataType.TF_INT32: return *(int*)buffer; + case TF_DataType.TF_DOUBLE: + return *(double*)buffer; default: return BufferToArray(); }