!10128 fix dataset_helper example bug

From: @caozhou_huawei
Reviewed-by: @kingxian,@zhunaipan
Signed-off-by: @kingxian
pull/10128/MERGE
mindspore-ci-bot 4 years ago committed by Gitee
commit e447f18764

@ -155,7 +155,7 @@ class DatasetHelper:
>>> network = Net()
>>> net_loss = nn.SoftmaxCrossEntropyWithLogits(sparse=True, reduction="mean")
>>> network = nn.WithLossCell(network, net_loss)
>>> train_dataset = create_custom_dataset()
>>> train_dataset = create_custom_dataset(sparse=True)
>>> dataset_helper = DatasetHelper(train_dataset, dataset_sink_mode=False)
>>> for next_element in dataset_helper:
... outputs = network(*next_element)

Loading…
Cancel
Save