MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / __init__

Method __init__

tensorflow/python/data/ops/readers.py:98–121  ·  view source on GitHub ↗

Creates a `TextLineDataset`. Args: filenames: A `tf.string` tensor containing one or more filenames. compression_type: (Optional.) A `tf.string` scalar evaluating to one of `""` (no compression), `"ZLIB"`, or `"GZIP"`. buffer_size: (Optional.) A `tf.int64` scalar denot

(self, filenames, compression_type=None, buffer_size=None)

Source from the content-addressed store, hash-verified

96 """A `Dataset` comprising records from one or more text files."""
97
98 def __init__(self, filenames, compression_type=None, buffer_size=None):
99 """Creates a `TextLineDataset`.
100
101 Args:
102 filenames: A `tf.string` tensor containing one or more filenames.
103 compression_type: (Optional.) A `tf.string` scalar evaluating to one of
104 `""` (no compression), `"ZLIB"`, or `"GZIP"`.
105 buffer_size: (Optional.) A `tf.int64` scalar denoting the number of bytes
106 to buffer. A value of 0 results in the default buffering values chosen
107 based on the compression type.
108 """
109 self._filenames = filenames
110 self._compression_type = convert.optional_param_to_tensor(
111 "compression_type",
112 compression_type,
113 argument_default="",
114 argument_dtype=dtypes.string)
115 self._buffer_size = convert.optional_param_to_tensor(
116 "buffer_size",
117 buffer_size,
118 argument_default=_DEFAULT_READER_BUFFER_SIZE_BYTES)
119 variant_tensor = gen_dataset_ops.text_line_dataset(
120 self._filenames, self._compression_type, self._buffer_size)
121 super(_TextLineDataset, self).__init__(variant_tensor)
122
123 @property
124 def element_spec(self):

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected