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

22 lines
786 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.show
======================
.. py:method:: mindspore.dataset.show(dataset, indentation=2)
将数据处理管道图写入MindSpore的INFO级别日志文件。
**参数:**
- **dataset** (Dataset): 数据处理管道对象。
- **indentation** (int, optional): 设置MindSpore的INFO级别日志文件打印时的缩进字符数。若为None则不缩进。
**样例:**
.. code-block::
>>> dataset = ds.MnistDataset(mnist_dataset_dir, 100)
>>> one_hot_encode = c_transforms.OneHot(10)
>>> dataset = dataset.map(operation=one_hot_encode, input_column_names="label")
>>> dataset = dataset.batch(batch_size=10, drop_remainder=True)
>>> ds.show(dataset)