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.

mindinsight_summary.proto 4.3 kB

5 years ago
5 years ago
5 years ago
5 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. // Copyright 2019 Huawei Technologies Co., Ltd.
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. syntax = "proto2";
  15. package mindinsight;
  16. option cc_enable_arenas = true;
  17. // The ANF IR define, include the tensor and graph define
  18. import "mindinsight_anf_ir.proto";
  19. // Event Protocol buffer, Top define
  20. message Event {
  21. // Timestamp
  22. required double wall_time = 1;
  23. // The step of train.
  24. optional int64 step = 2;
  25. oneof what {
  26. // An event file was started, with the specified version.
  27. // Now version is "Mindspore.Event:1"
  28. string version = 3;
  29. // GraphDef.
  30. GraphProto graph_def = 4;
  31. // Summary data
  32. Summary summary = 5;
  33. Explain explain = 6;
  34. }
  35. }
  36. // A Summary is a set of named values that be produced regularly during training
  37. message Summary {
  38. message Image {
  39. // Dimensions of the image.
  40. required int32 height = 1;
  41. required int32 width = 2;
  42. // Valid colorspace values are
  43. // 1 - grayscale
  44. // 2 - grayscale + alpha
  45. // 3 - RGB
  46. // 4 - RGBA
  47. // 5 - DIGITAL_YUV
  48. // 6 - BGRA
  49. required int32 colorspace = 3;
  50. // Image data in encoded format. Now only support the RGB.
  51. required bytes encoded_image = 4;
  52. }
  53. message Histogram {
  54. message bucket{
  55. // Counting number of values fallen in [left, left + width).
  56. // For the rightmost bucket, the range is [left, left + width].
  57. required double left = 1;
  58. required double width = 2;
  59. required int64 count = 3;
  60. }
  61. repeated bucket buckets = 1;
  62. optional int64 nan_count = 2;
  63. optional int64 pos_inf_count = 3;
  64. optional int64 neg_inf_count = 4;
  65. // max, min, sum will not take nan and inf into account.
  66. // If there is no valid value in tensor, max and min will be nan, sum will be 0.
  67. optional double max = 5;
  68. optional double min = 6;
  69. optional double sum = 7;
  70. // total number of values. including nan and inf.
  71. optional int64 count = 8;
  72. }
  73. message Value {
  74. // Tag name for the data.
  75. required string tag = 1;
  76. // Value associated with the tag.
  77. oneof value {
  78. float scalar_value = 3;
  79. Image image = 4;
  80. TensorProto tensor = 8;
  81. Histogram histogram = 9;
  82. }
  83. }
  84. // Set of values for the summary.
  85. repeated Value value = 1;
  86. }
  87. message Explain {
  88. message Inference{
  89. repeated float ground_truth_prob = 1;
  90. repeated int32 predicted_label = 2;
  91. repeated float predicted_prob = 3;
  92. repeated float ground_truth_prob_sd = 4;
  93. repeated float ground_truth_prob_itl95_low = 5;
  94. repeated float ground_truth_prob_itl95_hi = 6;
  95. repeated float predicted_prob_sd = 7;
  96. repeated float predicted_prob_itl95_low = 8;
  97. repeated float predicted_prob_itl95_hi = 9;
  98. }
  99. message Explanation{
  100. optional string explain_method = 1;
  101. optional int32 label = 2;
  102. optional string heatmap_path = 3;
  103. }
  104. message Benchmark{
  105. optional string benchmark_method = 1;
  106. optional string explain_method = 2;
  107. optional float total_score = 3;
  108. repeated float label_score = 4;
  109. }
  110. message Metadata{
  111. repeated string label = 1;
  112. repeated string explain_method = 2;
  113. repeated string benchmark_method = 3;
  114. }
  115. optional int32 sample_id = 1; // The Metadata and sample id must have one fill in
  116. optional string image_path = 2;
  117. repeated int32 ground_truth_label = 3;
  118. optional Inference inference = 4;
  119. repeated Explanation explanation = 5;
  120. repeated Benchmark benchmark = 6;
  121. optional Metadata metadata = 7;
  122. optional string status = 8; // enum value: run, end
  123. }