Options used for manipulating TFRecord files.
View aliases
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.io.TFRecordOptions
, tf.compat.v1.python_io.TFRecordOptions
tf.io.TFRecordOptions(
compression_type=None, flush_mode=None, input_buffer_size=None,
output_buffer_size=None, window_bits=None, compression_level=None,
compression_method=None, mem_level=None, compression_strategy=None
)
Args | |
---|---|
compression_
|
"GZIP" , "ZLIB" , or "" (no compression).
|
flush_
|
flush mode or None , Default: Z_NO_FLUSH.
|
input_
|
int or None .
|
output_
|
int or None .
|
window_
|
int or None .
|
compression_
|
0 to 9, or None .
|
compression_
|
compression method or None .
|
mem_
|
1 to 9, or None .
|
compression_
|
strategy or None . Default: Z_DEFAULT_STRATEGY.
|
Raises | |
---|---|
ValueError
|
If compression_type is invalid. |
Methods
get_compression_type_string
@classmethod
get_compression_type_string( options )
Convert various option types to a unified string.
Args | |
---|---|
options
|
TFRecordOption , TFRecordCompressionType , or string.
|
Returns | |
---|---|
Compression type as string (e.g. 'ZLIB' , 'GZIP' , or '' ).
|
Raises | |
---|---|
ValueError
|
If compression_type is invalid. |