From d6043346520e604ad26c27eb8b5c44d80cd75503 Mon Sep 17 00:00:00 2001 From: liuyang_655 Date: Fri, 2 Apr 2021 16:40:53 +0800 Subject: [PATCH] modify datasethelper comment --- mindspore/train/dataset_helper.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/mindspore/train/dataset_helper.py b/mindspore/train/dataset_helper.py index f95eb4cfbe..01f1ff1c3c 100644 --- a/mindspore/train/dataset_helper.py +++ b/mindspore/train/dataset_helper.py @@ -178,15 +178,12 @@ class DatasetHelper: epoch_num (int): Control the number of epoch data to send. Default: 1. Examples: - >>> from mindspore import nn, DatasetHelper + >>> from mindspore import DatasetHelper >>> - >>> network = Net() - >>> net_loss = nn.SoftmaxCrossEntropyWithLogits(sparse=True, reduction="mean") - >>> network = nn.WithLossCell(network, net_loss) >>> train_dataset = create_custom_dataset() - >>> dataset_helper = DatasetHelper(train_dataset, dataset_sink_mode=False) - >>> for next_element in dataset_helper: - ... outputs = network(*next_element) + >>> set_helper = DatasetHelper(train_dataset, dataset_sink_mode=False) + >>> for next_element in set_helper: + >>> print(next_element) """ def __init__(self, dataset, dataset_sink_mode=True, sink_size=-1, epoch_num=1):