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.

summary.proto 3.0 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. /**
  2. * Copyright 2019 Huawei Technologies Co., Ltd
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. syntax = "proto2";
  17. package mindspore.irpb;
  18. option cc_enable_arenas = true;
  19. // The ANF IR define, include the tensor and graph define
  20. import "anf_ir.proto";
  21. // Event Protocol buffer, Top define
  22. message Event {
  23. // Timestamp
  24. required double wall_time = 1;
  25. // The step of train.
  26. optional int64 step = 2;
  27. oneof what {
  28. // An event file was started, with the specified version.
  29. // Now version is "MindSpore.Event:1"
  30. string version = 3;
  31. // GraphDef.
  32. GraphProto graph_def = 4;
  33. // Summary data
  34. Summary summary = 5;
  35. }
  36. }
  37. // A Summary is a set of named values that be produced regularly during training
  38. message Summary {
  39. message Image {
  40. // Dimensions of the image.
  41. required int32 height = 1;
  42. required int32 width = 2;
  43. // Valid colorspace values are:
  44. // 1 - grayscale type
  45. // 2 - grayscale + alpha type
  46. // 3 - RGB type
  47. // 4 - RGBA type
  48. // 5 - DIGITAL_YUV type
  49. // 6 - BGRA type
  50. required int32 colorspace = 3;
  51. // Image data in encoded format. Now only support the RGB.
  52. required bytes encoded_image = 4;
  53. }
  54. message Histogram {
  55. message bucket{
  56. // Count number of values fallen in [left, left + width).
  57. // For the right most bucket, range is [left, left + width].
  58. required double left = 1;
  59. required double width = 2;
  60. required int64 count = 3;
  61. }
  62. repeated bucket buckets = 1;
  63. optional int64 nan_count = 2;
  64. optional int64 pos_inf_count = 3;
  65. optional int64 neg_inf_count = 4;
  66. // max, min, sum will not take nan and inf into account.
  67. // If there is no valid value in tensor, max will be nan, min will be nan, sum will be 0.
  68. optional double max = 5;
  69. optional double min = 6;
  70. optional double sum = 7;
  71. // total number of values, including nan and inf
  72. optional int64 count = 8;
  73. }
  74. message Value {
  75. // Tag name for the data.
  76. required string tag = 1;
  77. // Value associated with the tag.
  78. oneof value {
  79. float scalar_value = 3;
  80. Image image = 4;
  81. TensorProto tensor = 8;
  82. Histogram histogram = 9;
  83. }
  84. }
  85. // Set of values for the summary.
  86. repeated Value value = 1;
  87. }