代码拉取完成,页面将自动刷新
class tf.data.TextLineDataset(
filenames,
compression_type=None,
buffer_size=None,
num_parallel_reads=None
)
For more information, see tf.data.TextLineDataset.
class mindspore.dataset.TextFileDataset(
dataset_files,
num_samples=None,
num_parallel_workers=None,
shuffle=Shuffle.GLOBAL,
num_shards=None,
shard_id=None,
cache=None
)
For more information, see mindspore.dataset.TextFileDataset.
TensorFlow: Create Dataset from a list of text files. It supports decompression operations and can set the cache size.
MindSpore: Create Dataset from a list of text files. It supports setting the number of samples.
# The following implements TextFileDataset with MindSpore.
import mindspore.dataset as ds
dataset_files = ['/tmp/example0.txt',
'/tmp/example1.txt']
dataset = ds.TextFileDataset(dataset_files)
# The following implements TextLineDataset with TensorFlow.
import tensorflow as tf
filenames = ['/tmp/example0.txt',
'/tmp/example1.txt']
dataset = tf.data.TextLineDataset(filenames)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。