|
|
@ -1136,7 +1136,7 @@ class Ones(PrimitiveWithInfer):
|
|
|
|
Tensor, has the same type and shape as input shape value.
|
|
|
|
Tensor, has the same type and shape as input shape value.
|
|
|
|
|
|
|
|
|
|
|
|
Supported Platforms:
|
|
|
|
Supported Platforms:
|
|
|
|
``Ascend`` ``GPU``
|
|
|
|
``Ascend`` ``GPU`` ``CPU``
|
|
|
|
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
Examples:
|
|
|
|
>>> from mindspore.ops import operations as ops
|
|
|
|
>>> from mindspore.ops import operations as ops
|
|
|
@ -1189,7 +1189,7 @@ class Zeros(PrimitiveWithInfer):
|
|
|
|
Tensor, has the same type and shape as input shape value.
|
|
|
|
Tensor, has the same type and shape as input shape value.
|
|
|
|
|
|
|
|
|
|
|
|
Supported Platforms:
|
|
|
|
Supported Platforms:
|
|
|
|
``Ascend`` ``GPU``
|
|
|
|
``Ascend`` ``GPU`` ``CPU``
|
|
|
|
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
Examples:
|
|
|
|
>>> from mindspore.ops import operations as ops
|
|
|
|
>>> from mindspore.ops import operations as ops
|
|
|
@ -1248,6 +1248,9 @@ class SequenceMask(PrimitiveWithInfer):
|
|
|
|
If max_length is not set and the biggest value in lengths is x. Then, the shape of
|
|
|
|
If max_length is not set and the biggest value in lengths is x. Then, the shape of
|
|
|
|
the output is (lengths.shape, x).
|
|
|
|
the output is (lengths.shape, x).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Supported Platforms:
|
|
|
|
|
|
|
|
``Ascend`` ``GPU`` ``CPU``
|
|
|
|
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
Examples:
|
|
|
|
>>> from mindspore.ops import operations as P
|
|
|
|
>>> from mindspore.ops import operations as P
|
|
|
|
>>> sequence_mask = P.SequenceMask()
|
|
|
|
>>> sequence_mask = P.SequenceMask()
|
|
|
|