diff --git a/mindspore/nn/layer/embedding.py b/mindspore/nn/layer/embedding.py index 8745a8929c..d356cce714 100755 --- a/mindspore/nn/layer/embedding.py +++ b/mindspore/nn/layer/embedding.py @@ -450,7 +450,7 @@ class MultiFieldEmbeddingLookup(EmbeddingLookup): >>> input_indices = Tensor([[2, 4, 6, 0, 0], [1, 3, 5, 0, 0]], mindspore.int32) >>> input_values = Tensor([[1, 1, 1, 0, 0], [1, 1, 1, 0, 0]], mindspore.float32) >>> field_ids = Tensor([[0, 1, 1, 0, 0], [0, 0, 1, 0, 0]], mindspore.int32) - >>> net = nn.MultiFieldEmbeddingLookup(10, 2, field_size=2, operator='SUM') + >>> net = nn.MultiFieldEmbeddingLookup(10, 2, field_size=2, operator='SUM', target='DEVICE') >>> out = net(input_indices, input_values, field_ids) >>> print(out.shape) (2, 2, 2) diff --git a/mindspore/ops/operations/nn_ops.py b/mindspore/ops/operations/nn_ops.py index c4e6656453..d50552835d 100644 --- a/mindspore/ops/operations/nn_ops.py +++ b/mindspore/ops/operations/nn_ops.py @@ -2328,8 +2328,8 @@ class SparseSoftmaxCrossEntropyWithLogits(PrimitiveWithInfer): Raises: TypeError: If `is_grad` is not a bool. - TypeError: If dtype of `logits' is neither float16 nor float32. - TypeError: If dtype of `labels' is neither int32 nor int64. + TypeError: If dtype of `logits` is neither float16 nor float32. + TypeError: If dtype of `labels` is neither int32 nor int64. ValueError: If logits_shape[0] != labels_shape[0]. Supported Platforms: