update example of sparsesoftmaxcrossentropywithlogtis

This commit is contained in:
liuhe 2021-04-14 11:07:47 +08:00
parent d5d65732f1
commit 95c7648e66
1 changed files with 1 additions and 1 deletions

View File

@ -2350,7 +2350,7 @@ class SparseSoftmaxCrossEntropyWithLogits(PrimitiveWithInfer):
``GPU`` ``CPU``
Examples:
>>> logits = Tensor([[2, 4, 1, 4, 5], [2, 1, 2, 4, 3]], mindspore.float32)
>>> logits = Tensor([[2, 3, 1, 4, 5], [2, 1, 2, 4, 3]], mindspore.float32)
>>> labels = Tensor([0, 1], mindspore.int32)
>>> sparse_softmax_cross = ops.SparseSoftmaxCrossEntropyWithLogits()
>>> loss = sparse_softmax_cross(logits, labels)