!40388 修复sparse docs
Merge pull request !40388 from 王程浩/code_docs_csr_softmax
This commit is contained in:
commit
b2ad845781
|
@ -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),
|
||||||
|
|
Loading…
Reference in New Issue