!40388 修复sparse docs

Merge pull request !40388 from 王程浩/code_docs_csr_softmax
This commit is contained in:
i-robot 2022-08-15 06:34:06 +00:00 committed by Gitee
commit b2ad845781
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 1 additions and 1 deletions

View File

@ -1195,7 +1195,7 @@ class SparseMatrixSoftmax(Primitive):
>>> net = SparseMatrixSoftmax(mstype.float32) >>> net = SparseMatrixSoftmax(mstype.float32)
>>> logits_pointers =Tensor(logits.values.shape[0], mstype.int32) >>> logits_pointers =Tensor(logits.values.shape[0], mstype.int32)
>>> out = net(Tensor(logits.shape, dtype=mstype.int32), logits_pointers, >>> out = net(Tensor(logits.shape, dtype=mstype.int32), logits_pointers,
... logits.indptr, logits.indices, logits.values) ... logits.indptr, logits.indices, logits.values)
>>> print(out) >>> print(out)
(Tensor(shape=[2], dtype=Int32, value= [2, 6]), (Tensor(shape=[2], dtype=Int32, value= [2, 6]),
Tensor(shape=[], dtype=Int32, value= 6), Tensor(shape=[], dtype=Int32, value= 6),