Browse Source

!10128 fix dataset_helper example bug

From: @caozhou_huawei
Reviewed-by: @kingxian,@zhunaipan
Signed-off-by: @kingxian
tags/v1.1.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
e447f18764
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      mindspore/train/dataset_helper.py

+ 1
- 1
mindspore/train/dataset_helper.py View File

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