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 // Class of data stored in this time series. Required for compatibility with 58 // TensorBoard's generic data facilities (`DataProvider`, et al.). This value 59 // imposes constraints on the dtype and shape of the corresponding tensor 60 // values. See `DataClass` docs for details. 61 DataClass data_class = 4; 62}; 63 64enum DataClass { 65 // Unknown data class, used (implicitly) for legacy data. Will not be 66 // processed by data ingestion pipelines. 67 DATA_CLASS_UNKNOWN = 0; 68 // Scalar time series. Each `Value` for the corresponding tag must have 69 // `tensor` set to a rank-0 tensor of floating-point dtype, which will be 70 // converted to float64. 71 DATA_CLASS_SCALAR = 1; 72 // Tensor time series. Each `Value` for the corresponding tag must have 73 // `tensor` set. The tensor value is arbitrary, but should be small to 74 // accommodate direct storage in database backends: an upper bound of a few 75 // kilobytes is a reasonable rule of thumb. 76 DATA_CLASS_TENSOR = 2; 77 // Blob sequence time series. Each `Value` for the corresponding tag must 78 // have `tensor` set to a rank-1 tensor of bytestring dtype. 79 DATA_CLASS_BLOB_SEQUENCE = 3; 80} 81 82// A Summary is a set of named values to be displayed by the 83// visualizer. 84// 85// Summaries are produced regularly during training, as controlled by 86// the "summary_interval_secs" attribute of the training operation. 87// Summaries are also produced at the end of an evaluation. 88message Summary { 89 message Image { 90 // Dimensions of the image. 91 int32 height = 1; 92 int32 width = 2; 93 // Valid colorspace values are 94 // 1 - grayscale 95 // 2 - grayscale + alpha 96 // 3 - RGB 97 // 4 - RGBA 98 // 5 - DIGITAL_YUV 99 // 6 - BGRA 100 int32 colorspace = 3; 101 // Image data in encoded format. All image formats supported by 102 // image_codec::CoderUtil can be stored here. 103 bytes encoded_image_string = 4; 104 } 105 106 message Audio { 107 // Sample rate of the audio in Hz. 108 float sample_rate = 1; 109 // Number of channels of audio. 110 int64 num_channels = 2; 111 // Length of the audio in frames (samples per channel). 112 int64 length_frames = 3; 113 // Encoded audio data and its associated RFC 2045 content type (e.g. 114 // "audio/wav"). 115 bytes encoded_audio_string = 4; 116 string content_type = 5; 117 } 118 119 message Value { 120 // This field is deprecated and will not be set. 121 string node_name = 7; 122 123 // Tag name for the data. Used by TensorBoard plugins to organize data. Tags 124 // are often organized by scope (which contains slashes to convey 125 // hierarchy). For example: foo/bar/0 126 string tag = 1; 127 128 // Contains metadata on the summary value such as which plugins may use it. 129 // Take note that many summary values may lack a metadata field. This is 130 // because the FileWriter only keeps a metadata object on the first summary 131 // value with a certain tag for each tag. TensorBoard then remembers which 132 // tags are associated with which plugins. This saves space. 133 SummaryMetadata metadata = 9; 134 135 // Value associated with the tag. 136 oneof value { 137 float simple_value = 2; 138 bytes obsolete_old_style_histogram = 3; 139 Image image = 4; 140 HistogramProto histo = 5; 141 Audio audio = 6; 142 TensorProto tensor = 8; 143 } 144 } 145 146 // Set of values for the summary. 147 repeated Value value = 1; 148} 149