tensorflow tf.data.TextLineDataset()对象 (包含来自一个或多个文本文件的行的“数据集”) 不懂是啥玩意??
生活随笔
收集整理的這篇文章主要介紹了
tensorflow tf.data.TextLineDataset()对象 (包含来自一个或多个文本文件的行的“数据集”) 不懂是啥玩意??
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
@tf_export("data.TextLineDataset")
class TextLineDataset(dataset_ops.Dataset):"""A `Dataset` comprising lines from one or more text files. 包含來自一個(gè)或多個(gè)文本文件的行的“數(shù)據(jù)集”"""def __init__(self, filenames, compression_type=None, buffer_size=None):"""Creates a `TextLineDataset`. 創(chuàng)建一個(gè)“ TextLineDataset”。Args:filenames: A `tf.string` tensor containing one or more filenames.包含一個(gè)或多個(gè)文件名的`tf.string`張量。compression_type: (Optional.) A `tf.string` scalar evaluating to one of`""` (no compression), `"ZLIB"`, or `"GZIP"`.一個(gè)tf.string標(biāo)量,其值為“”(無壓縮),“ 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標(biāo)量,表示要緩沖的字節(jié)數(shù)。 值為0會(huì)導(dǎo)致根據(jù)壓縮類型選擇默認(rèn)的緩沖值。"""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位技術(shù)專家面對(duì)面20年技術(shù)見證,附贈(zèng)技術(shù)全景圖
總結(jié)
以上是生活随笔為你收集整理的tensorflow tf.data.TextLineDataset()对象 (包含来自一个或多个文本文件的行的“数据集”) 不懂是啥玩意??的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: python中三个双引号 的作用是什么
- 下一篇: tensorflow dataset_o