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 9option cc_enable_arenas = true; 10 11// This file contains protocol buffers for working with tf.data Datasets. 12 13// Metadata describing a compressed component of a dataset element. 14message CompressedComponentMetadata { 15 // The dtype of the component tensor. 16 .tensorflow.DataType dtype = 1; 17 // The shape of the component tensor. 18 .tensorflow.TensorShapeProto tensor_shape = 2; 19 // Size of the uncompressed tensor bytes. For tensors serialized as 20 // TensorProtos, this is TensorProto::BytesAllocatedLong(). For raw Tensors, 21 // this is the size of the buffer underlying the Tensor. 22 int64 tensor_size_bytes = 3; 23} 24 25message CompressedElement { 26 // Compressed tensor bytes for all components of the element. 27 bytes data = 1; 28 // Metadata for the components of the element. 29 repeated CompressedComponentMetadata component_metadata = 2; 30} 31 32// An uncompressed dataset element. 33message UncompressedElement { 34 repeated TensorProto components = 1; 35} 36