1syntax = "proto3"; 2 3package tensorflow; 4option cc_enable_arenas = true; 5option java_outer_classname = "SummaryProtos"; 6option java_multiple_files = true; 7option java_package = "org.tensorflow.framework"; 8option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework"; 9import "tensorflow/core/framework/tensor.proto"; 10 11// Metadata associated with a series of Summary data 12message SummaryDescription { 13 // Hint on how plugins should process the data in this series. 14 // Supported values include "scalar", "histogram", "image", "audio" 15 string type_hint = 1; 16} 17 18// Serialization format for histogram module in 19// core/lib/histogram/histogram.h 20message HistogramProto { 21 double min = 1; 22 double max = 2; 23 double num = 3; 24 double sum = 4; 25 double sum_squares = 5; 26 27 // Parallel arrays encoding the bucket boundaries and the bucket values. 28 // bucket(i) is the count for the bucket i. The range for 29 // a bucket is: 30 // i == 0: -DBL_MAX .. bucket_limit(0) 31 // i != 0: bucket_limit(i-1) .. bucket_limit(i) 32 repeated double bucket_limit = 6 [packed = true]; 33 repeated double bucket = 7 [packed = true]; 34}; 35 36// A SummaryMetadata encapsulates information on which plugins are able to make 37// use of a certain summary value. 38message SummaryMetadata { 39 message PluginData { 40 // The name of the plugin this data pertains to. 41 string plugin_name = 1; 42 43 // The content to store for the plugin. The best practice is for this to be 44 // a binary serialized protocol buffer. 45 bytes content = 2; 46 } 47 48 // Data that associates a summary with a certain plugin. 49 PluginData plugin_data = 1; 50 51 // Display name for viewing in TensorBoard. 52 string display_name = 2; 53 54 // Longform readable description of the summary sequence. Markdown supported. 55 string summary_description = 3; 56}; 57 58// A Summary is a set of named values to be displayed by the 59// visualizer. 60// 61// Summaries are produced regularly during training, as controlled by 62// the "summary_interval_secs" attribute of the training operation. 63// Summaries are also produced at the end of an evaluation. 64message Summary { 65 message Image { 66 // Dimensions of the image. 67 int32 height = 1; 68 int32 width = 2; 69 // Valid colorspace values are 70 // 1 - grayscale 71 // 2 - grayscale + alpha 72 // 3 - RGB 73 // 4 - RGBA 74 // 5 - DIGITAL_YUV 75 // 6 - BGRA 76 int32 colorspace = 3; 77 // Image data in encoded format. All image formats supported by 78 // image_codec::CoderUtil can be stored here. 79 bytes encoded_image_string = 4; 80 } 81 82 message Audio { 83 // Sample rate of the audio in Hz. 84 float sample_rate = 1; 85 // Number of channels of audio. 86 int64 num_channels = 2; 87 // Length of the audio in frames (samples per channel). 88 int64 length_frames = 3; 89 // Encoded audio data and its associated RFC 2045 content type (e.g. 90 // "audio/wav"). 91 bytes encoded_audio_string = 4; 92 string content_type = 5; 93 } 94 95 message Value { 96 // This field is deprecated and will not be set. 97 string node_name = 7; 98 99 // Tag name for the data. Used by TensorBoard plugins to organize data. Tags 100 // are often organized by scope (which contains slashes to convey 101 // hierarchy). For example: foo/bar/0 102 string tag = 1; 103 104 // Contains metadata on the summary value such as which plugins may use it. 105 // Take note that many summary values may lack a metadata field. This is 106 // because the FileWriter only keeps a metadata object on the first summary 107 // value with a certain tag for each tag. TensorBoard then remembers which 108 // tags are associated with which plugins. This saves space. 109 SummaryMetadata metadata = 9; 110 111 // Value associated with the tag. 112 oneof value { 113 float simple_value = 2; 114 bytes obsolete_old_style_histogram = 3; 115 Image image = 4; 116 HistogramProto histo = 5; 117 Audio audio = 6; 118 TensorProto tensor = 8; 119 } 120 } 121 122 // Set of values for the summary. 123 repeated Value value = 1; 124} 125