Browse Source

fix dataset example

tags/v1.1.0
caozhou 5 years ago
parent
commit
22e57648c8
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