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.

CheckpointState.cs 14 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347
  1. // <auto-generated>
  2. // Generated by the protocol buffer compiler. DO NOT EDIT!
  3. // source: tensorflow/python/training/checkpoint_state.proto
  4. // </auto-generated>
  5. #pragma warning disable 1591, 0612, 3021, 8981
  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/python/training/checkpoint_state.proto</summary>
  13. public static partial class CheckpointStateReflection {
  14. #region Descriptor
  15. /// <summary>File descriptor for tensorflow/python/training/checkpoint_state.proto</summary>
  16. public static pbr::FileDescriptor Descriptor {
  17. get { return descriptor; }
  18. }
  19. private static pbr::FileDescriptor descriptor;
  20. static CheckpointStateReflection() {
  21. byte[] descriptorData = global::System.Convert.FromBase64String(
  22. string.Concat(
  23. "CjF0ZW5zb3JmbG93L3B5dGhvbi90cmFpbmluZy9jaGVja3BvaW50X3N0YXRl",
  24. "LnByb3RvEgp0ZW5zb3JmbG93Ip8BCg9DaGVja3BvaW50U3RhdGUSHQoVbW9k",
  25. "ZWxfY2hlY2twb2ludF9wYXRoGAEgASgJEiIKGmFsbF9tb2RlbF9jaGVja3Bv",
  26. "aW50X3BhdGhzGAIgAygJEicKH2FsbF9tb2RlbF9jaGVja3BvaW50X3RpbWVz",
  27. "dGFtcHMYAyADKAESIAoYbGFzdF9wcmVzZXJ2ZWRfdGltZXN0YW1wGAQgASgB",
  28. "QgP4AQFiBnByb3RvMw=="));
  29. descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
  30. new pbr::FileDescriptor[] { },
  31. new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
  32. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.CheckpointState), global::Tensorflow.CheckpointState.Parser, new[]{ "ModelCheckpointPath", "AllModelCheckpointPaths", "AllModelCheckpointTimestamps", "LastPreservedTimestamp" }, null, null, null, null)
  33. }));
  34. }
  35. #endregion
  36. }
  37. #region Messages
  38. /// <summary>
  39. /// Protocol buffer representing the checkpoint state.
  40. /// </summary>
  41. public sealed partial class CheckpointState : pb::IMessage<CheckpointState>
  42. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  43. , pb::IBufferMessage
  44. #endif
  45. {
  46. private static readonly pb::MessageParser<CheckpointState> _parser = new pb::MessageParser<CheckpointState>(() => new CheckpointState());
  47. private pb::UnknownFieldSet _unknownFields;
  48. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  49. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  50. public static pb::MessageParser<CheckpointState> Parser { get { return _parser; } }
  51. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  52. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  53. public static pbr::MessageDescriptor Descriptor {
  54. get { return global::Tensorflow.CheckpointStateReflection.Descriptor.MessageTypes[0]; }
  55. }
  56. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  57. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  58. pbr::MessageDescriptor pb::IMessage.Descriptor {
  59. get { return Descriptor; }
  60. }
  61. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  62. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  63. public CheckpointState() {
  64. OnConstruction();
  65. }
  66. partial void OnConstruction();
  67. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  68. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  69. public CheckpointState(CheckpointState other) : this() {
  70. modelCheckpointPath_ = other.modelCheckpointPath_;
  71. allModelCheckpointPaths_ = other.allModelCheckpointPaths_.Clone();
  72. allModelCheckpointTimestamps_ = other.allModelCheckpointTimestamps_.Clone();
  73. lastPreservedTimestamp_ = other.lastPreservedTimestamp_;
  74. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  75. }
  76. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  77. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  78. public CheckpointState Clone() {
  79. return new CheckpointState(this);
  80. }
  81. /// <summary>Field number for the "model_checkpoint_path" field.</summary>
  82. public const int ModelCheckpointPathFieldNumber = 1;
  83. private string modelCheckpointPath_ = "";
  84. /// <summary>
  85. /// Path to the most-recent model checkpoint.
  86. /// </summary>
  87. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  88. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  89. public string ModelCheckpointPath {
  90. get { return modelCheckpointPath_; }
  91. set {
  92. modelCheckpointPath_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  93. }
  94. }
  95. /// <summary>Field number for the "all_model_checkpoint_paths" field.</summary>
  96. public const int AllModelCheckpointPathsFieldNumber = 2;
  97. private static readonly pb::FieldCodec<string> _repeated_allModelCheckpointPaths_codec
  98. = pb::FieldCodec.ForString(18);
  99. private readonly pbc::RepeatedField<string> allModelCheckpointPaths_ = new pbc::RepeatedField<string>();
  100. /// <summary>
  101. /// Paths to all not-yet-deleted model checkpoints, sorted from oldest to
  102. /// newest.
  103. /// Note that the value of model_checkpoint_path should be the last item in
  104. /// this list.
  105. /// </summary>
  106. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  107. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  108. public pbc::RepeatedField<string> AllModelCheckpointPaths {
  109. get { return allModelCheckpointPaths_; }
  110. }
  111. /// <summary>Field number for the "all_model_checkpoint_timestamps" field.</summary>
  112. public const int AllModelCheckpointTimestampsFieldNumber = 3;
  113. private static readonly pb::FieldCodec<double> _repeated_allModelCheckpointTimestamps_codec
  114. = pb::FieldCodec.ForDouble(26);
  115. private readonly pbc::RepeatedField<double> allModelCheckpointTimestamps_ = new pbc::RepeatedField<double>();
  116. /// <summary>
  117. /// Unix timestamps corresponding to all_model_checkpoint_paths, indicating
  118. /// when each checkpoint was created.
  119. /// </summary>
  120. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  121. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  122. public pbc::RepeatedField<double> AllModelCheckpointTimestamps {
  123. get { return allModelCheckpointTimestamps_; }
  124. }
  125. /// <summary>Field number for the "last_preserved_timestamp" field.</summary>
  126. public const int LastPreservedTimestampFieldNumber = 4;
  127. private double lastPreservedTimestamp_;
  128. /// <summary>
  129. /// Unix timestamp indicating the creation time for the last preserved
  130. /// checkpoint.
  131. /// </summary>
  132. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  133. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  134. public double LastPreservedTimestamp {
  135. get { return lastPreservedTimestamp_; }
  136. set {
  137. lastPreservedTimestamp_ = value;
  138. }
  139. }
  140. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  141. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  142. public override bool Equals(object other) {
  143. return Equals(other as CheckpointState);
  144. }
  145. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  146. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  147. public bool Equals(CheckpointState other) {
  148. if (ReferenceEquals(other, null)) {
  149. return false;
  150. }
  151. if (ReferenceEquals(other, this)) {
  152. return true;
  153. }
  154. if (ModelCheckpointPath != other.ModelCheckpointPath) return false;
  155. if(!allModelCheckpointPaths_.Equals(other.allModelCheckpointPaths_)) return false;
  156. if(!allModelCheckpointTimestamps_.Equals(other.allModelCheckpointTimestamps_)) return false;
  157. if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(LastPreservedTimestamp, other.LastPreservedTimestamp)) return false;
  158. return Equals(_unknownFields, other._unknownFields);
  159. }
  160. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  161. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  162. public override int GetHashCode() {
  163. int hash = 1;
  164. if (ModelCheckpointPath.Length != 0) hash ^= ModelCheckpointPath.GetHashCode();
  165. hash ^= allModelCheckpointPaths_.GetHashCode();
  166. hash ^= allModelCheckpointTimestamps_.GetHashCode();
  167. if (LastPreservedTimestamp != 0D) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(LastPreservedTimestamp);
  168. if (_unknownFields != null) {
  169. hash ^= _unknownFields.GetHashCode();
  170. }
  171. return hash;
  172. }
  173. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  174. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  175. public override string ToString() {
  176. return pb::JsonFormatter.ToDiagnosticString(this);
  177. }
  178. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  179. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  180. public void WriteTo(pb::CodedOutputStream output) {
  181. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  182. output.WriteRawMessage(this);
  183. #else
  184. if (ModelCheckpointPath.Length != 0) {
  185. output.WriteRawTag(10);
  186. output.WriteString(ModelCheckpointPath);
  187. }
  188. allModelCheckpointPaths_.WriteTo(output, _repeated_allModelCheckpointPaths_codec);
  189. allModelCheckpointTimestamps_.WriteTo(output, _repeated_allModelCheckpointTimestamps_codec);
  190. if (LastPreservedTimestamp != 0D) {
  191. output.WriteRawTag(33);
  192. output.WriteDouble(LastPreservedTimestamp);
  193. }
  194. if (_unknownFields != null) {
  195. _unknownFields.WriteTo(output);
  196. }
  197. #endif
  198. }
  199. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  200. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  201. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  202. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  203. if (ModelCheckpointPath.Length != 0) {
  204. output.WriteRawTag(10);
  205. output.WriteString(ModelCheckpointPath);
  206. }
  207. allModelCheckpointPaths_.WriteTo(ref output, _repeated_allModelCheckpointPaths_codec);
  208. allModelCheckpointTimestamps_.WriteTo(ref output, _repeated_allModelCheckpointTimestamps_codec);
  209. if (LastPreservedTimestamp != 0D) {
  210. output.WriteRawTag(33);
  211. output.WriteDouble(LastPreservedTimestamp);
  212. }
  213. if (_unknownFields != null) {
  214. _unknownFields.WriteTo(ref output);
  215. }
  216. }
  217. #endif
  218. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  219. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  220. public int CalculateSize() {
  221. int size = 0;
  222. if (ModelCheckpointPath.Length != 0) {
  223. size += 1 + pb::CodedOutputStream.ComputeStringSize(ModelCheckpointPath);
  224. }
  225. size += allModelCheckpointPaths_.CalculateSize(_repeated_allModelCheckpointPaths_codec);
  226. size += allModelCheckpointTimestamps_.CalculateSize(_repeated_allModelCheckpointTimestamps_codec);
  227. if (LastPreservedTimestamp != 0D) {
  228. size += 1 + 8;
  229. }
  230. if (_unknownFields != null) {
  231. size += _unknownFields.CalculateSize();
  232. }
  233. return size;
  234. }
  235. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  236. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  237. public void MergeFrom(CheckpointState other) {
  238. if (other == null) {
  239. return;
  240. }
  241. if (other.ModelCheckpointPath.Length != 0) {
  242. ModelCheckpointPath = other.ModelCheckpointPath;
  243. }
  244. allModelCheckpointPaths_.Add(other.allModelCheckpointPaths_);
  245. allModelCheckpointTimestamps_.Add(other.allModelCheckpointTimestamps_);
  246. if (other.LastPreservedTimestamp != 0D) {
  247. LastPreservedTimestamp = other.LastPreservedTimestamp;
  248. }
  249. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  250. }
  251. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  252. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  253. public void MergeFrom(pb::CodedInputStream input) {
  254. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  255. input.ReadRawMessage(this);
  256. #else
  257. uint tag;
  258. while ((tag = input.ReadTag()) != 0) {
  259. switch(tag) {
  260. default:
  261. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  262. break;
  263. case 10: {
  264. ModelCheckpointPath = input.ReadString();
  265. break;
  266. }
  267. case 18: {
  268. allModelCheckpointPaths_.AddEntriesFrom(input, _repeated_allModelCheckpointPaths_codec);
  269. break;
  270. }
  271. case 26:
  272. case 25: {
  273. allModelCheckpointTimestamps_.AddEntriesFrom(input, _repeated_allModelCheckpointTimestamps_codec);
  274. break;
  275. }
  276. case 33: {
  277. LastPreservedTimestamp = input.ReadDouble();
  278. break;
  279. }
  280. }
  281. }
  282. #endif
  283. }
  284. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  285. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  286. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  287. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  288. uint tag;
  289. while ((tag = input.ReadTag()) != 0) {
  290. switch(tag) {
  291. default:
  292. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  293. break;
  294. case 10: {
  295. ModelCheckpointPath = input.ReadString();
  296. break;
  297. }
  298. case 18: {
  299. allModelCheckpointPaths_.AddEntriesFrom(ref input, _repeated_allModelCheckpointPaths_codec);
  300. break;
  301. }
  302. case 26:
  303. case 25: {
  304. allModelCheckpointTimestamps_.AddEntriesFrom(ref input, _repeated_allModelCheckpointTimestamps_codec);
  305. break;
  306. }
  307. case 33: {
  308. LastPreservedTimestamp = input.ReadDouble();
  309. break;
  310. }
  311. }
  312. }
  313. }
  314. #endif
  315. }
  316. #endregion
  317. }
  318. #endregion Designer generated code