public class TFRecordIO
extends java.lang.Object
PTransform
s for reading and writing TensorFlow TFRecord files.Modifier and Type | Class and Description |
---|---|
static class |
TFRecordIO.CompressionType
Deprecated.
Use
Compression . |
static class |
TFRecordIO.Read
Implementation of
read() . |
static class |
TFRecordIO.Write
Implementation of
write() . |
Modifier and Type | Field and Description |
---|---|
static Coder<byte[]> |
DEFAULT_BYTE_ARRAY_CODER
The default coder, which returns each record of the input file as a byte array.
|
Modifier and Type | Method and Description |
---|---|
static TFRecordIO.Read |
read()
A
PTransform that reads from a TFRecord file (or multiple TFRecord
files matching a pattern) and returns a PCollection containing
the decoding of each of the records of the TFRecord file(s) as a byte array. |
static TFRecordIO.Write |
write()
A
PTransform that writes a PCollection to TFRecord file (or
multiple TFRecord files matching a sharding pattern), with each
element of the input collection encoded into its own record. |
public static final Coder<byte[]> DEFAULT_BYTE_ARRAY_CODER
public static TFRecordIO.Read read()
PTransform
that reads from a TFRecord file (or multiple TFRecord
files matching a pattern) and returns a PCollection
containing
the decoding of each of the records of the TFRecord file(s) as a byte array.public static TFRecordIO.Write write()
PTransform
that writes a PCollection
to TFRecord file (or
multiple TFRecord files matching a sharding pattern), with each
element of the input collection encoded into its own record.