You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

TrackableObjectGraph.cs 42 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965
  1. // <auto-generated>
  2. // Generated by the protocol buffer compiler. DO NOT EDIT!
  3. // source: tensorflow/core/protobuf/trackable_object_graph.proto
  4. // </auto-generated>
  5. #pragma warning disable 1591, 0612, 3021
  6. #region Designer generated code
  7. using pb = global::Google.Protobuf;
  8. using pbc = global::Google.Protobuf.Collections;
  9. using pbr = global::Google.Protobuf.Reflection;
  10. using scg = global::System.Collections.Generic;
  11. namespace Tensorflow {
  12. /// <summary>Holder for reflection information generated from tensorflow/core/protobuf/trackable_object_graph.proto</summary>
  13. public static partial class TrackableObjectGraphReflection {
  14. #region Descriptor
  15. /// <summary>File descriptor for tensorflow/core/protobuf/trackable_object_graph.proto</summary>
  16. public static pbr::FileDescriptor Descriptor {
  17. get { return descriptor; }
  18. }
  19. private static pbr::FileDescriptor descriptor;
  20. static TrackableObjectGraphReflection() {
  21. byte[] descriptorData = global::System.Convert.FromBase64String(
  22. string.Concat(
  23. "CjV0ZW5zb3JmbG93L2NvcmUvcHJvdG9idWYvdHJhY2thYmxlX29iamVjdF9n",
  24. "cmFwaC5wcm90bxIKdGVuc29yZmxvdyKDBQoUVHJhY2thYmxlT2JqZWN0R3Jh",
  25. "cGgSPwoFbm9kZXMYASADKAsyMC50ZW5zb3JmbG93LlRyYWNrYWJsZU9iamVj",
  26. "dEdyYXBoLlRyYWNrYWJsZU9iamVjdBqpBAoPVHJhY2thYmxlT2JqZWN0ElIK",
  27. "CGNoaWxkcmVuGAEgAygLMkAudGVuc29yZmxvdy5UcmFja2FibGVPYmplY3RH",
  28. "cmFwaC5UcmFja2FibGVPYmplY3QuT2JqZWN0UmVmZXJlbmNlElUKCmF0dHJp",
  29. "YnV0ZXMYAiADKAsyQS50ZW5zb3JmbG93LlRyYWNrYWJsZU9iamVjdEdyYXBo",
  30. "LlRyYWNrYWJsZU9iamVjdC5TZXJpYWxpemVkVGVuc29yEl4KDnNsb3RfdmFy",
  31. "aWFibGVzGAMgAygLMkYudGVuc29yZmxvdy5UcmFja2FibGVPYmplY3RHcmFw",
  32. "aC5UcmFja2FibGVPYmplY3QuU2xvdFZhcmlhYmxlUmVmZXJlbmNlGjYKD09i",
  33. "amVjdFJlZmVyZW5jZRIPCgdub2RlX2lkGAEgASgFEhIKCmxvY2FsX25hbWUY",
  34. "AiABKAkaZQoQU2VyaWFsaXplZFRlbnNvchIMCgRuYW1lGAEgASgJEhEKCWZ1",
  35. "bGxfbmFtZRgCIAEoCRIWCg5jaGVja3BvaW50X2tleRgDIAEoCRIYChBvcHRp",
  36. "b25hbF9yZXN0b3JlGAQgASgIGmwKFVNsb3RWYXJpYWJsZVJlZmVyZW5jZRIh",
  37. "ChlvcmlnaW5hbF92YXJpYWJsZV9ub2RlX2lkGAEgASgFEhEKCXNsb3RfbmFt",
  38. "ZRgCIAEoCRIdChVzbG90X3ZhcmlhYmxlX25vZGVfaWQYAyABKAVCWlpVZ2l0",
  39. "aHViLmNvbS90ZW5zb3JmbG93L3RlbnNvcmZsb3cvdGVuc29yZmxvdy9nby9j",
  40. "b3JlL3Byb3RvYnVmL2Zvcl9jb3JlX3Byb3Rvc19nb19wcm90b/gBAWIGcHJv",
  41. "dG8z"));
  42. descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
  43. new pbr::FileDescriptor[] { },
  44. new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
  45. 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),
  46. 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),
  47. 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)})})
  48. }));
  49. }
  50. #endregion
  51. }
  52. #region Messages
  53. public sealed partial class TrackableObjectGraph : pb::IMessage<TrackableObjectGraph> {
  54. private static readonly pb::MessageParser<TrackableObjectGraph> _parser = new pb::MessageParser<TrackableObjectGraph>(() => new TrackableObjectGraph());
  55. private pb::UnknownFieldSet _unknownFields;
  56. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  57. public static pb::MessageParser<TrackableObjectGraph> Parser { get { return _parser; } }
  58. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  59. public static pbr::MessageDescriptor Descriptor {
  60. get { return global::Tensorflow.TrackableObjectGraphReflection.Descriptor.MessageTypes[0]; }
  61. }
  62. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  63. pbr::MessageDescriptor pb::IMessage.Descriptor {
  64. get { return Descriptor; }
  65. }
  66. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  67. public TrackableObjectGraph() {
  68. OnConstruction();
  69. }
  70. partial void OnConstruction();
  71. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  72. public TrackableObjectGraph(TrackableObjectGraph other) : this() {
  73. nodes_ = other.nodes_.Clone();
  74. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  75. }
  76. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  77. public TrackableObjectGraph Clone() {
  78. return new TrackableObjectGraph(this);
  79. }
  80. /// <summary>Field number for the "nodes" field.</summary>
  81. public const int NodesFieldNumber = 1;
  82. private static readonly pb::FieldCodec<global::Tensorflow.TrackableObjectGraph.Types.TrackableObject> _repeated_nodes_codec
  83. = pb::FieldCodec.ForMessage(10, global::Tensorflow.TrackableObjectGraph.Types.TrackableObject.Parser);
  84. private readonly pbc::RepeatedField<global::Tensorflow.TrackableObjectGraph.Types.TrackableObject> nodes_ = new pbc::RepeatedField<global::Tensorflow.TrackableObjectGraph.Types.TrackableObject>();
  85. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  86. public pbc::RepeatedField<global::Tensorflow.TrackableObjectGraph.Types.TrackableObject> Nodes {
  87. get { return nodes_; }
  88. }
  89. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  90. public override bool Equals(object other) {
  91. return Equals(other as TrackableObjectGraph);
  92. }
  93. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  94. public bool Equals(TrackableObjectGraph other) {
  95. if (ReferenceEquals(other, null)) {
  96. return false;
  97. }
  98. if (ReferenceEquals(other, this)) {
  99. return true;
  100. }
  101. if(!nodes_.Equals(other.nodes_)) return false;
  102. return Equals(_unknownFields, other._unknownFields);
  103. }
  104. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  105. public override int GetHashCode() {
  106. int hash = 1;
  107. hash ^= nodes_.GetHashCode();
  108. if (_unknownFields != null) {
  109. hash ^= _unknownFields.GetHashCode();
  110. }
  111. return hash;
  112. }
  113. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  114. public override string ToString() {
  115. return pb::JsonFormatter.ToDiagnosticString(this);
  116. }
  117. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  118. public void WriteTo(pb::CodedOutputStream output) {
  119. nodes_.WriteTo(output, _repeated_nodes_codec);
  120. if (_unknownFields != null) {
  121. _unknownFields.WriteTo(output);
  122. }
  123. }
  124. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  125. public int CalculateSize() {
  126. int size = 0;
  127. size += nodes_.CalculateSize(_repeated_nodes_codec);
  128. if (_unknownFields != null) {
  129. size += _unknownFields.CalculateSize();
  130. }
  131. return size;
  132. }
  133. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  134. public void MergeFrom(TrackableObjectGraph other) {
  135. if (other == null) {
  136. return;
  137. }
  138. nodes_.Add(other.nodes_);
  139. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  140. }
  141. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  142. public void MergeFrom(pb::CodedInputStream input) {
  143. uint tag;
  144. while ((tag = input.ReadTag()) != 0) {
  145. switch(tag) {
  146. default:
  147. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  148. break;
  149. case 10: {
  150. nodes_.AddEntriesFrom(input, _repeated_nodes_codec);
  151. break;
  152. }
  153. }
  154. }
  155. }
  156. #region Nested types
  157. /// <summary>Container for nested types declared in the TrackableObjectGraph message type.</summary>
  158. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  159. public static partial class Types {
  160. public sealed partial class TrackableObject : pb::IMessage<TrackableObject> {
  161. private static readonly pb::MessageParser<TrackableObject> _parser = new pb::MessageParser<TrackableObject>(() => new TrackableObject());
  162. private pb::UnknownFieldSet _unknownFields;
  163. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  164. public static pb::MessageParser<TrackableObject> Parser { get { return _parser; } }
  165. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  166. public static pbr::MessageDescriptor Descriptor {
  167. get { return global::Tensorflow.TrackableObjectGraph.Descriptor.NestedTypes[0]; }
  168. }
  169. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  170. pbr::MessageDescriptor pb::IMessage.Descriptor {
  171. get { return Descriptor; }
  172. }
  173. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  174. public TrackableObject() {
  175. OnConstruction();
  176. }
  177. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  178. public TrackableObject(pbc::RepeatedField<global::Tensorflow.TrackableObjectGraph.Types.TrackableObject.Types.SlotVariableReference> slot) {
  179. OnConstruction();
  180. slotVariables_ = slot;
  181. }
  182. partial void OnConstruction();
  183. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  184. public TrackableObject(TrackableObject other) : this() {
  185. children_ = other.children_.Clone();
  186. attributes_ = other.attributes_.Clone();
  187. slotVariables_ = other.slotVariables_.Clone();
  188. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  189. }
  190. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  191. public TrackableObject Clone() {
  192. return new TrackableObject(this);
  193. }
  194. /// <summary>Field number for the "children" field.</summary>
  195. public const int ChildrenFieldNumber = 1;
  196. private static readonly pb::FieldCodec<global::Tensorflow.TrackableObjectGraph.Types.TrackableObject.Types.ObjectReference> _repeated_children_codec
  197. = pb::FieldCodec.ForMessage(10, global::Tensorflow.TrackableObjectGraph.Types.TrackableObject.Types.ObjectReference.Parser);
  198. private readonly pbc::RepeatedField<global::Tensorflow.TrackableObjectGraph.Types.TrackableObject.Types.ObjectReference> children_ = new pbc::RepeatedField<global::Tensorflow.TrackableObjectGraph.Types.TrackableObject.Types.ObjectReference>();
  199. /// <summary>
  200. /// Objects which this object depends on.
  201. /// </summary>
  202. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  203. public pbc::RepeatedField<global::Tensorflow.TrackableObjectGraph.Types.TrackableObject.Types.ObjectReference> Children {
  204. get { return children_; }
  205. }
  206. /// <summary>Field number for the "attributes" field.</summary>
  207. public const int AttributesFieldNumber = 2;
  208. private static readonly pb::FieldCodec<global::Tensorflow.TrackableObjectGraph.Types.TrackableObject.Types.SerializedTensor> _repeated_attributes_codec
  209. = pb::FieldCodec.ForMessage(18, global::Tensorflow.TrackableObjectGraph.Types.TrackableObject.Types.SerializedTensor.Parser);
  210. private readonly pbc::RepeatedField<global::Tensorflow.TrackableObjectGraph.Types.TrackableObject.Types.SerializedTensor> attributes_ = new pbc::RepeatedField<global::Tensorflow.TrackableObjectGraph.Types.TrackableObject.Types.SerializedTensor>();
  211. /// <summary>
  212. /// Serialized data specific to this object.
  213. /// </summary>
  214. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  215. public pbc::RepeatedField<global::Tensorflow.TrackableObjectGraph.Types.TrackableObject.Types.SerializedTensor> Attributes {
  216. get { return attributes_; }
  217. }
  218. /// <summary>Field number for the "slot_variables" field.</summary>
  219. public const int SlotVariablesFieldNumber = 3;
  220. private static readonly pb::FieldCodec<global::Tensorflow.TrackableObjectGraph.Types.TrackableObject.Types.SlotVariableReference> _repeated_slotVariables_codec
  221. = pb::FieldCodec.ForMessage(26, global::Tensorflow.TrackableObjectGraph.Types.TrackableObject.Types.SlotVariableReference.Parser);
  222. private readonly pbc::RepeatedField<global::Tensorflow.TrackableObjectGraph.Types.TrackableObject.Types.SlotVariableReference> slotVariables_ = new pbc::RepeatedField<global::Tensorflow.TrackableObjectGraph.Types.TrackableObject.Types.SlotVariableReference>();
  223. /// <summary>
  224. /// Slot variables owned by this object.
  225. /// </summary>
  226. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  227. public pbc::RepeatedField<global::Tensorflow.TrackableObjectGraph.Types.TrackableObject.Types.SlotVariableReference> SlotVariables {
  228. get { return slotVariables_; }
  229. }
  230. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  231. public override bool Equals(object other) {
  232. return Equals(other as TrackableObject);
  233. }
  234. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  235. public bool Equals(TrackableObject other) {
  236. if (ReferenceEquals(other, null)) {
  237. return false;
  238. }
  239. if (ReferenceEquals(other, this)) {
  240. return true;
  241. }
  242. if(!children_.Equals(other.children_)) return false;
  243. if(!attributes_.Equals(other.attributes_)) return false;
  244. if(!slotVariables_.Equals(other.slotVariables_)) return false;
  245. return Equals(_unknownFields, other._unknownFields);
  246. }
  247. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  248. public override int GetHashCode() {
  249. int hash = 1;
  250. hash ^= children_.GetHashCode();
  251. hash ^= attributes_.GetHashCode();
  252. hash ^= slotVariables_.GetHashCode();
  253. if (_unknownFields != null) {
  254. hash ^= _unknownFields.GetHashCode();
  255. }
  256. return hash;
  257. }
  258. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  259. public override string ToString() {
  260. return pb::JsonFormatter.ToDiagnosticString(this);
  261. }
  262. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  263. public void WriteTo(pb::CodedOutputStream output) {
  264. children_.WriteTo(output, _repeated_children_codec);
  265. attributes_.WriteTo(output, _repeated_attributes_codec);
  266. slotVariables_.WriteTo(output, _repeated_slotVariables_codec);
  267. if (_unknownFields != null) {
  268. _unknownFields.WriteTo(output);
  269. }
  270. }
  271. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  272. public int CalculateSize() {
  273. int size = 0;
  274. size += children_.CalculateSize(_repeated_children_codec);
  275. size += attributes_.CalculateSize(_repeated_attributes_codec);
  276. size += slotVariables_.CalculateSize(_repeated_slotVariables_codec);
  277. if (_unknownFields != null) {
  278. size += _unknownFields.CalculateSize();
  279. }
  280. return size;
  281. }
  282. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  283. public void MergeFrom(TrackableObject other) {
  284. if (other == null) {
  285. return;
  286. }
  287. children_.Add(other.children_);
  288. attributes_.Add(other.attributes_);
  289. slotVariables_.Add(other.slotVariables_);
  290. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  291. }
  292. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  293. public void MergeFrom(pb::CodedInputStream input) {
  294. uint tag;
  295. while ((tag = input.ReadTag()) != 0) {
  296. switch(tag) {
  297. default:
  298. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  299. break;
  300. case 10: {
  301. children_.AddEntriesFrom(input, _repeated_children_codec);
  302. break;
  303. }
  304. case 18: {
  305. attributes_.AddEntriesFrom(input, _repeated_attributes_codec);
  306. break;
  307. }
  308. case 26: {
  309. slotVariables_.AddEntriesFrom(input, _repeated_slotVariables_codec);
  310. break;
  311. }
  312. }
  313. }
  314. }
  315. #region Nested types
  316. /// <summary>Container for nested types declared in the TrackableObject message type.</summary>
  317. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  318. public static partial class Types {
  319. public sealed partial class ObjectReference : pb::IMessage<ObjectReference> {
  320. private static readonly pb::MessageParser<ObjectReference> _parser = new pb::MessageParser<ObjectReference>(() => new ObjectReference());
  321. private pb::UnknownFieldSet _unknownFields;
  322. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  323. public static pb::MessageParser<ObjectReference> Parser { get { return _parser; } }
  324. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  325. public static pbr::MessageDescriptor Descriptor {
  326. get { return global::Tensorflow.TrackableObjectGraph.Types.TrackableObject.Descriptor.NestedTypes[0]; }
  327. }
  328. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  329. pbr::MessageDescriptor pb::IMessage.Descriptor {
  330. get { return Descriptor; }
  331. }
  332. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  333. public ObjectReference() {
  334. OnConstruction();
  335. }
  336. partial void OnConstruction();
  337. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  338. public ObjectReference(ObjectReference other) : this() {
  339. nodeId_ = other.nodeId_;
  340. localName_ = other.localName_;
  341. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  342. }
  343. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  344. public ObjectReference Clone() {
  345. return new ObjectReference(this);
  346. }
  347. /// <summary>Field number for the "node_id" field.</summary>
  348. public const int NodeIdFieldNumber = 1;
  349. private int nodeId_;
  350. /// <summary>
  351. /// An index into `TrackableObjectGraph.nodes`, indicating the object
  352. /// being referenced.
  353. /// </summary>
  354. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  355. public int NodeId {
  356. get { return nodeId_; }
  357. set {
  358. nodeId_ = value;
  359. }
  360. }
  361. /// <summary>Field number for the "local_name" field.</summary>
  362. public const int LocalNameFieldNumber = 2;
  363. private string localName_ = "";
  364. /// <summary>
  365. /// A user-provided name for the edge.
  366. /// </summary>
  367. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  368. public string LocalName {
  369. get { return localName_; }
  370. set {
  371. localName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  372. }
  373. }
  374. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  375. public override bool Equals(object other) {
  376. return Equals(other as ObjectReference);
  377. }
  378. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  379. public bool Equals(ObjectReference other) {
  380. if (ReferenceEquals(other, null)) {
  381. return false;
  382. }
  383. if (ReferenceEquals(other, this)) {
  384. return true;
  385. }
  386. if (NodeId != other.NodeId) return false;
  387. if (LocalName != other.LocalName) return false;
  388. return Equals(_unknownFields, other._unknownFields);
  389. }
  390. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  391. public override int GetHashCode() {
  392. int hash = 1;
  393. if (NodeId != 0) hash ^= NodeId.GetHashCode();
  394. if (LocalName.Length != 0) hash ^= LocalName.GetHashCode();
  395. if (_unknownFields != null) {
  396. hash ^= _unknownFields.GetHashCode();
  397. }
  398. return hash;
  399. }
  400. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  401. public override string ToString() {
  402. return pb::JsonFormatter.ToDiagnosticString(this);
  403. }
  404. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  405. public void WriteTo(pb::CodedOutputStream output) {
  406. if (NodeId != 0) {
  407. output.WriteRawTag(8);
  408. output.WriteInt32(NodeId);
  409. }
  410. if (LocalName.Length != 0) {
  411. output.WriteRawTag(18);
  412. output.WriteString(LocalName);
  413. }
  414. if (_unknownFields != null) {
  415. _unknownFields.WriteTo(output);
  416. }
  417. }
  418. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  419. public int CalculateSize() {
  420. int size = 0;
  421. if (NodeId != 0) {
  422. size += 1 + pb::CodedOutputStream.ComputeInt32Size(NodeId);
  423. }
  424. if (LocalName.Length != 0) {
  425. size += 1 + pb::CodedOutputStream.ComputeStringSize(LocalName);
  426. }
  427. if (_unknownFields != null) {
  428. size += _unknownFields.CalculateSize();
  429. }
  430. return size;
  431. }
  432. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  433. public void MergeFrom(ObjectReference other) {
  434. if (other == null) {
  435. return;
  436. }
  437. if (other.NodeId != 0) {
  438. NodeId = other.NodeId;
  439. }
  440. if (other.LocalName.Length != 0) {
  441. LocalName = other.LocalName;
  442. }
  443. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  444. }
  445. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  446. public void MergeFrom(pb::CodedInputStream input) {
  447. uint tag;
  448. while ((tag = input.ReadTag()) != 0) {
  449. switch(tag) {
  450. default:
  451. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  452. break;
  453. case 8: {
  454. NodeId = input.ReadInt32();
  455. break;
  456. }
  457. case 18: {
  458. LocalName = input.ReadString();
  459. break;
  460. }
  461. }
  462. }
  463. }
  464. }
  465. public sealed partial class SerializedTensor : pb::IMessage<SerializedTensor> {
  466. private static readonly pb::MessageParser<SerializedTensor> _parser = new pb::MessageParser<SerializedTensor>(() => new SerializedTensor());
  467. private pb::UnknownFieldSet _unknownFields;
  468. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  469. public static pb::MessageParser<SerializedTensor> Parser { get { return _parser; } }
  470. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  471. public static pbr::MessageDescriptor Descriptor {
  472. get { return global::Tensorflow.TrackableObjectGraph.Types.TrackableObject.Descriptor.NestedTypes[1]; }
  473. }
  474. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  475. pbr::MessageDescriptor pb::IMessage.Descriptor {
  476. get { return Descriptor; }
  477. }
  478. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  479. public SerializedTensor() {
  480. OnConstruction();
  481. }
  482. partial void OnConstruction();
  483. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  484. public SerializedTensor(SerializedTensor other) : this() {
  485. name_ = other.name_;
  486. fullName_ = other.fullName_;
  487. checkpointKey_ = other.checkpointKey_;
  488. optionalRestore_ = other.optionalRestore_;
  489. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  490. }
  491. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  492. public SerializedTensor Clone() {
  493. return new SerializedTensor(this);
  494. }
  495. /// <summary>Field number for the "name" field.</summary>
  496. public const int NameFieldNumber = 1;
  497. private string name_ = "";
  498. /// <summary>
  499. /// A name for the Tensor. Simple variables have only one
  500. /// `SerializedTensor` named "VARIABLE_VALUE" by convention. This value may
  501. /// be restored on object creation as an optimization.
  502. /// </summary>
  503. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  504. public string Name {
  505. get { return name_; }
  506. set {
  507. name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  508. }
  509. }
  510. /// <summary>Field number for the "full_name" field.</summary>
  511. public const int FullNameFieldNumber = 2;
  512. private string fullName_ = "";
  513. /// <summary>
  514. /// The full name of the variable/tensor, if applicable. Used to allow
  515. /// name-based loading of checkpoints which were saved using an
  516. /// object-based API. Should match the checkpoint key which would have been
  517. /// assigned by tf.train.Saver.
  518. /// </summary>
  519. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  520. public string FullName {
  521. get { return fullName_; }
  522. set {
  523. fullName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  524. }
  525. }
  526. /// <summary>Field number for the "checkpoint_key" field.</summary>
  527. public const int CheckpointKeyFieldNumber = 3;
  528. private string checkpointKey_ = "";
  529. /// <summary>
  530. /// The generated name of the Tensor in the checkpoint.
  531. /// </summary>
  532. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  533. public string CheckpointKey {
  534. get { return checkpointKey_; }
  535. set {
  536. checkpointKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  537. }
  538. }
  539. /// <summary>Field number for the "optional_restore" field.</summary>
  540. public const int OptionalRestoreFieldNumber = 4;
  541. private bool optionalRestore_;
  542. /// <summary>
  543. /// Whether checkpoints should be considered as matching even without this
  544. /// value restored. Used for non-critical values which don't affect the
  545. /// TensorFlow graph, such as layer configurations.
  546. /// </summary>
  547. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  548. public bool OptionalRestore {
  549. get { return optionalRestore_; }
  550. set {
  551. optionalRestore_ = value;
  552. }
  553. }
  554. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  555. public override bool Equals(object other) {
  556. return Equals(other as SerializedTensor);
  557. }
  558. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  559. public bool Equals(SerializedTensor other) {
  560. if (ReferenceEquals(other, null)) {
  561. return false;
  562. }
  563. if (ReferenceEquals(other, this)) {
  564. return true;
  565. }
  566. if (Name != other.Name) return false;
  567. if (FullName != other.FullName) return false;
  568. if (CheckpointKey != other.CheckpointKey) return false;
  569. if (OptionalRestore != other.OptionalRestore) return false;
  570. return Equals(_unknownFields, other._unknownFields);
  571. }
  572. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  573. public override int GetHashCode() {
  574. int hash = 1;
  575. if (Name.Length != 0) hash ^= Name.GetHashCode();
  576. if (FullName.Length != 0) hash ^= FullName.GetHashCode();
  577. if (CheckpointKey.Length != 0) hash ^= CheckpointKey.GetHashCode();
  578. if (OptionalRestore != false) hash ^= OptionalRestore.GetHashCode();
  579. if (_unknownFields != null) {
  580. hash ^= _unknownFields.GetHashCode();
  581. }
  582. return hash;
  583. }
  584. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  585. public override string ToString() {
  586. return pb::JsonFormatter.ToDiagnosticString(this);
  587. }
  588. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  589. public void WriteTo(pb::CodedOutputStream output) {
  590. if (Name.Length != 0) {
  591. output.WriteRawTag(10);
  592. output.WriteString(Name);
  593. }
  594. if (FullName.Length != 0) {
  595. output.WriteRawTag(18);
  596. output.WriteString(FullName);
  597. }
  598. if (CheckpointKey.Length != 0) {
  599. output.WriteRawTag(26);
  600. output.WriteString(CheckpointKey);
  601. }
  602. if (OptionalRestore != false) {
  603. output.WriteRawTag(32);
  604. output.WriteBool(OptionalRestore);
  605. }
  606. if (_unknownFields != null) {
  607. _unknownFields.WriteTo(output);
  608. }
  609. }
  610. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  611. public int CalculateSize() {
  612. int size = 0;
  613. if (Name.Length != 0) {
  614. size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
  615. }
  616. if (FullName.Length != 0) {
  617. size += 1 + pb::CodedOutputStream.ComputeStringSize(FullName);
  618. }
  619. if (CheckpointKey.Length != 0) {
  620. size += 1 + pb::CodedOutputStream.ComputeStringSize(CheckpointKey);
  621. }
  622. if (OptionalRestore != false) {
  623. size += 1 + 1;
  624. }
  625. if (_unknownFields != null) {
  626. size += _unknownFields.CalculateSize();
  627. }
  628. return size;
  629. }
  630. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  631. public void MergeFrom(SerializedTensor other) {
  632. if (other == null) {
  633. return;
  634. }
  635. if (other.Name.Length != 0) {
  636. Name = other.Name;
  637. }
  638. if (other.FullName.Length != 0) {
  639. FullName = other.FullName;
  640. }
  641. if (other.CheckpointKey.Length != 0) {
  642. CheckpointKey = other.CheckpointKey;
  643. }
  644. if (other.OptionalRestore != false) {
  645. OptionalRestore = other.OptionalRestore;
  646. }
  647. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  648. }
  649. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  650. public void MergeFrom(pb::CodedInputStream input) {
  651. uint tag;
  652. while ((tag = input.ReadTag()) != 0) {
  653. switch(tag) {
  654. default:
  655. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  656. break;
  657. case 10: {
  658. Name = input.ReadString();
  659. break;
  660. }
  661. case 18: {
  662. FullName = input.ReadString();
  663. break;
  664. }
  665. case 26: {
  666. CheckpointKey = input.ReadString();
  667. break;
  668. }
  669. case 32: {
  670. OptionalRestore = input.ReadBool();
  671. break;
  672. }
  673. }
  674. }
  675. }
  676. }
  677. public sealed partial class SlotVariableReference : pb::IMessage<SlotVariableReference> {
  678. private static readonly pb::MessageParser<SlotVariableReference> _parser = new pb::MessageParser<SlotVariableReference>(() => new SlotVariableReference());
  679. private pb::UnknownFieldSet _unknownFields;
  680. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  681. public static pb::MessageParser<SlotVariableReference> Parser { get { return _parser; } }
  682. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  683. public static pbr::MessageDescriptor Descriptor {
  684. get { return global::Tensorflow.TrackableObjectGraph.Types.TrackableObject.Descriptor.NestedTypes[2]; }
  685. }
  686. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  687. pbr::MessageDescriptor pb::IMessage.Descriptor {
  688. get { return Descriptor; }
  689. }
  690. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  691. public SlotVariableReference() {
  692. OnConstruction();
  693. }
  694. partial void OnConstruction();
  695. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  696. public SlotVariableReference(SlotVariableReference other) : this() {
  697. originalVariableNodeId_ = other.originalVariableNodeId_;
  698. slotName_ = other.slotName_;
  699. slotVariableNodeId_ = other.slotVariableNodeId_;
  700. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  701. }
  702. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  703. public SlotVariableReference Clone() {
  704. return new SlotVariableReference(this);
  705. }
  706. /// <summary>Field number for the "original_variable_node_id" field.</summary>
  707. public const int OriginalVariableNodeIdFieldNumber = 1;
  708. private int originalVariableNodeId_;
  709. /// <summary>
  710. /// An index into `TrackableObjectGraph.nodes`, indicating the
  711. /// variable object this slot was created for.
  712. /// </summary>
  713. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  714. public int OriginalVariableNodeId {
  715. get { return originalVariableNodeId_; }
  716. set {
  717. originalVariableNodeId_ = value;
  718. }
  719. }
  720. /// <summary>Field number for the "slot_name" field.</summary>
  721. public const int SlotNameFieldNumber = 2;
  722. private string slotName_ = "";
  723. /// <summary>
  724. /// The name of the slot (e.g. "m"/"v").
  725. /// </summary>
  726. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  727. public string SlotName {
  728. get { return slotName_; }
  729. set {
  730. slotName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  731. }
  732. }
  733. /// <summary>Field number for the "slot_variable_node_id" field.</summary>
  734. public const int SlotVariableNodeIdFieldNumber = 3;
  735. private int slotVariableNodeId_;
  736. /// <summary>
  737. /// An index into `TrackableObjectGraph.nodes`, indicating the
  738. /// `Object` with the value of the slot variable.
  739. /// </summary>
  740. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  741. public int SlotVariableNodeId {
  742. get { return slotVariableNodeId_; }
  743. set {
  744. slotVariableNodeId_ = value;
  745. }
  746. }
  747. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  748. public override bool Equals(object other) {
  749. return Equals(other as SlotVariableReference);
  750. }
  751. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  752. public bool Equals(SlotVariableReference other) {
  753. if (ReferenceEquals(other, null)) {
  754. return false;
  755. }
  756. if (ReferenceEquals(other, this)) {
  757. return true;
  758. }
  759. if (OriginalVariableNodeId != other.OriginalVariableNodeId) return false;
  760. if (SlotName != other.SlotName) return false;
  761. if (SlotVariableNodeId != other.SlotVariableNodeId) return false;
  762. return Equals(_unknownFields, other._unknownFields);
  763. }
  764. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  765. public override int GetHashCode() {
  766. int hash = 1;
  767. if (OriginalVariableNodeId != 0) hash ^= OriginalVariableNodeId.GetHashCode();
  768. if (SlotName.Length != 0) hash ^= SlotName.GetHashCode();
  769. if (SlotVariableNodeId != 0) hash ^= SlotVariableNodeId.GetHashCode();
  770. if (_unknownFields != null) {
  771. hash ^= _unknownFields.GetHashCode();
  772. }
  773. return hash;
  774. }
  775. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  776. public override string ToString() {
  777. return pb::JsonFormatter.ToDiagnosticString(this);
  778. }
  779. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  780. public void WriteTo(pb::CodedOutputStream output) {
  781. if (OriginalVariableNodeId != 0) {
  782. output.WriteRawTag(8);
  783. output.WriteInt32(OriginalVariableNodeId);
  784. }
  785. if (SlotName.Length != 0) {
  786. output.WriteRawTag(18);
  787. output.WriteString(SlotName);
  788. }
  789. if (SlotVariableNodeId != 0) {
  790. output.WriteRawTag(24);
  791. output.WriteInt32(SlotVariableNodeId);
  792. }
  793. if (_unknownFields != null) {
  794. _unknownFields.WriteTo(output);
  795. }
  796. }
  797. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  798. public int CalculateSize() {
  799. int size = 0;
  800. if (OriginalVariableNodeId != 0) {
  801. size += 1 + pb::CodedOutputStream.ComputeInt32Size(OriginalVariableNodeId);
  802. }
  803. if (SlotName.Length != 0) {
  804. size += 1 + pb::CodedOutputStream.ComputeStringSize(SlotName);
  805. }
  806. if (SlotVariableNodeId != 0) {
  807. size += 1 + pb::CodedOutputStream.ComputeInt32Size(SlotVariableNodeId);
  808. }
  809. if (_unknownFields != null) {
  810. size += _unknownFields.CalculateSize();
  811. }
  812. return size;
  813. }
  814. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  815. public void MergeFrom(SlotVariableReference other) {
  816. if (other == null) {
  817. return;
  818. }
  819. if (other.OriginalVariableNodeId != 0) {
  820. OriginalVariableNodeId = other.OriginalVariableNodeId;
  821. }
  822. if (other.SlotName.Length != 0) {
  823. SlotName = other.SlotName;
  824. }
  825. if (other.SlotVariableNodeId != 0) {
  826. SlotVariableNodeId = other.SlotVariableNodeId;
  827. }
  828. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  829. }
  830. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  831. public void MergeFrom(pb::CodedInputStream input) {
  832. uint tag;
  833. while ((tag = input.ReadTag()) != 0) {
  834. switch(tag) {
  835. default:
  836. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  837. break;
  838. case 8: {
  839. OriginalVariableNodeId = input.ReadInt32();
  840. break;
  841. }
  842. case 18: {
  843. SlotName = input.ReadString();
  844. break;
  845. }
  846. case 24: {
  847. SlotVariableNodeId = input.ReadInt32();
  848. break;
  849. }
  850. }
  851. }
  852. }
  853. }
  854. }
  855. #endregion
  856. }
  857. }
  858. #endregion
  859. }
  860. #endregion
  861. }
  862. #endregion Designer generated code