mindspore.dataset.show

View Source On Gitee
mindspore.dataset.show(dataset, indentation=2)[source]

Write the dataset pipeline graph to logger.info file.

Parameters
  • dataset (Dataset) – The starting node.

  • indentation (int, optional) – The indentation used by the JSON print. Do not indent if indentation is None. Default: 2, indent 2 space.

Examples

>>> import mindspore.dataset as ds
>>> import mindspore.dataset.transforms as transforms
>>>
>>> mnist_dataset_dir = "/path/to/mnist_dataset_directory"
>>> dataset = ds.MnistDataset(mnist_dataset_dir, num_samples=100)
>>> one_hot_encode = transforms.OneHot(10)
>>> dataset = dataset.map(operations=one_hot_encode, input_columns="label")
>>> dataset = dataset.batch(batch_size=10, drop_remainder=True)
>>> ds.show(dataset)