mindspore/docs/api/api_python/dataset/mindspore.dataset.rst

19 lines
998 B
ReStructuredText
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

mindspore.dataset
该模块提供了加载和处理各种通用数据集的API如MNIST、CIFAR-10、CIFAR-100、VOC、COCO、ImageNet、CelebA、CLUE等
也支持加载业界标准格式的数据集包括MindRecord、TFRecord、Manifest等。此外用户还可以使用此模块定义和加载自己的数据集。
该模块还提供了在加载时进行数据采样的API如SequentialSample、RandomSampler、DistributedSampler等。
大多数数据集可以通过指定参数`cache`启用缓存服务,以提升整体数据处理效率。
请注意Windows平台上还不支持缓存服务因此在Windows上加载和处理数据时请勿使用。更多介绍和限制
请参考`Single-Node Tensor Cache <https://www.mindspore.cn/docs/programming_guide/zh-CN/master/cache.html>`_
在API示例中常用的模块导入方法如下
.. code-block::
import mindspore.dataset as ds
from mindspore.dataset.transforms import c_transforms