mindspore.dataset.compare

View Source On Gitee
mindspore.dataset.compare(pipeline1, pipeline2)[source]

Compare if two dataset pipelines are the same.

Parameters
  • pipeline1 (Dataset) – a dataset pipeline.

  • pipeline2 (Dataset) – a dataset pipeline.

Returns

Whether pipeline1 is equal to pipeline2.

Examples

>>> import mindspore.dataset as ds
>>>
>>> pipeline1 = ds.MnistDataset("/path/to/mnist_dataset_directory", num_samples=100)
>>> pipeline2 = ds.Cifar10Dataset("/path/to/cifar10_dataset_directory", num_samples=100)
>>> res = ds.compare(pipeline1, pipeline2)