modify datasethelper comment

This commit is contained in:
liuyang_655 2021-04-02 16:40:53 +08:00
parent bb3a19363c
commit d604334652
1 changed files with 4 additions and 7 deletions

View File

@ -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):