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