mindspore.dataset.Dataset.reset
- Dataset.reset()[source]
Reset the dataset for next epoch.
Examples
>>> mind_dataset_dir = ["/path/to/mind_dataset_file"] >>> dataset = ds.MindDataset(dataset_files=mind_dataset_dir) >>> for _ in range(5): ... num_iter = 0 ... for data in dataset.create_tuple_iterator(num_epochs=1, output_numpy=True): ... num_iter += 1 ... dataset.reset()