• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1syntax = "proto3";
2
3package tensorflow.data.experimental;
4
5import "tensorflow/core/framework/tensor.proto";
6import "tensorflow/core/framework/tensor_shape.proto";
7import "tensorflow/core/framework/types.proto";
8
9option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto";
10
11// Each SnapshotRecord represents one batch of pre-processed input data. A batch
12// consists of a list of tensors that we encode as TensorProtos. This message
13// doesn't store the structure of the batch.
14message SnapshotRecord {
15  repeated .tensorflow.TensorProto tensor = 1;
16}
17
18// This stores the metadata information present in each snapshot record.
19message SnapshotMetadataRecord {
20  // Stores the fingerprint of the graph that describes the dataset that is
21  // snapshotted.
22  string graph_hash = 1;
23  // Run ID that this snapshot corresponds to.
24  string run_id = 2;
25  // Time when we started creating this snapshot.
26  int64 creation_timestamp = 3;
27  // Version of the snapshot data file format.
28  int64 version = 4;
29  // A list of tensor dtype corresponding to each element of the snapshot.
30  repeated .tensorflow.DataType dtype = 5;
31  // The number of elements in the snapshot.
32  int64 num_elements = 6;
33
34  bool finalized = 1000;
35}
36
37// Metadata for a single tensor in the Snapshot Record.
38message TensorMetadata {
39  .tensorflow.TensorShapeProto tensor_shape = 2;
40  // Number of uncompressed bytes used to store the tensor representation.
41  int64 tensor_size_bytes = 3;
42}
43
44// Metadata for all the tensors in a Snapshot Record.
45message SnapshotTensorMetadata {
46  repeated TensorMetadata tensor_metadata = 1;
47}
48