tensorflow tf.data.TextLineDataset()对象 (包含来自一个或多个文本文件的行的“数据集”) 不懂是啥玩意??
生活随笔
收集整理的這篇文章主要介紹了
tensorflow tf.data.TextLineDataset()对象 (包含来自一个或多个文本文件的行的“数据集”) 不懂是啥玩意??
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
@tf_export("data.TextLineDataset")
class TextLineDataset(dataset_ops.Dataset):"""A `Dataset` comprising lines from one or more text files. 包含來自一個或多個文本文件的行的“數據集”"""def __init__(self, filenames, compression_type=None, buffer_size=None):"""Creates a `TextLineDataset`. 創建一個“ TextLineDataset”。Args:filenames: A `tf.string` tensor containing one or more filenames.包含一個或多個文件名的`tf.string`張量。compression_type: (Optional.) A `tf.string` scalar evaluating to one of`""` (no compression), `"ZLIB"`, or `"GZIP"`.一個tf.string標量,其值為“”(無壓縮),“ ZLIB”或“ GZIP”之一。buffer_size: (Optional.) A `tf.int64` scalar denoting the number of bytesto buffer. A value of 0 results in the default buffering values chosenbased on the compression type.tf.int64標量,表示要緩沖的字節數。 值為0會導致根據壓縮類型選擇默認的緩沖值。"""super(TextLineDataset, self).__init__()self._filenames = ops.convert_to_tensor(filenames, dtype=dtypes.string, name="filenames")self._compression_type = convert.optional_param_to_tensor("compression_type",compression_type,argument_default="",argument_dtype=dtypes.string)self._buffer_size = convert.optional_param_to_tensor("buffer_size", buffer_size, _DEFAULT_READER_BUFFER_SIZE_BYTES)def _as_variant_tensor(self):return gen_dataset_ops.text_line_dataset(self._filenames, self._compression_type, self._buffer_size)@propertydef output_classes(self):return ops.Tensor@propertydef output_shapes(self):return tensor_shape.scalar()@propertydef output_types(self):return dtypes.string
與50位技術專家面對面20年技術見證,附贈技術全景圖
總結
以上是生活随笔為你收集整理的tensorflow tf.data.TextLineDataset()对象 (包含来自一个或多个文本文件的行的“数据集”) 不懂是啥玩意??的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: python中三个双引号 的作用是什么
- 下一篇: tensorflow dataset_o