1syntax = "proto3"; 2 3package tensorflow.data; 4 5import "tensorflow/core/framework/tensor.proto"; 6import "tensorflow/core/framework/tensor_shape.proto"; 7import "tensorflow/core/framework/types.proto"; 8 9// This file contains protocol buffers for working with tf.data Datasets. 10 11// Metadata describing a compressed component of a dataset element. 12message CompressedComponentMetadata { 13 // The dtype of the component tensor. 14 .tensorflow.DataType dtype = 1; 15 // The shape of the component tensor. 16 .tensorflow.TensorShapeProto tensor_shape = 2; 17 // Size of the uncompressed tensor bytes. For tensors serialized as 18 // TensorProtos, this is TensorProto::BytesAllocatedLong(). For raw Tensors, 19 // this is the size of the buffer underlying the Tensor. 20 int64 tensor_size_bytes = 3; 21} 22 23message CompressedElement { 24 // Compressed tensor bytes for all components of the element. 25 bytes data = 1; 26 // Metadata for the components of the element. 27 repeated CompressedComponentMetadata component_metadata = 2; 28} 29 30// An uncompressed dataset element. 31message UncompressedElement { 32 repeated TensorProto components = 1; 33} 34