2022-03-24 16:04:00 +08:00
mindspore.ops.functional
=============================
functional算子是经过初始化后的Primitive, 可以直接作为函数使用。functional算子的使用示例如下:
.. code-block :: python
from mindspore import Tensor, ops
from mindspore import dtype as mstype
input_x = Tensor(-1, mstype.int32)
input_dict = {'x':1, 'y':2}
result_abs = ops.absolute(input_x)
print(result_abs)
result_in_dict = ops.in_dict('x', input_dict)
print(result_in_dict)
result_not_in_dict = ops.not_in_dict('x', input_dict)
print(result_not_in_dict)
result_isconstant = ops.isconstant(input_x)
print(result_isconstant)
result_typeof = ops.typeof(input_x)
print(result_typeof)
# outputs:
# 1
# True
# False
# True
# Tensor[Int32]
2022-07-22 16:58:38 +08:00
神经网络层函数
2022-03-31 16:40:42 +08:00
----------------
2022-05-19 16:29:07 +08:00
神经网络
^^^^^^^^
.. mscnplatformautosummary ::
:toctree: ops
:nosignatures:
:template: classtemplate.rst
2022-05-19 17:55:27 +08:00
mindspore.ops.adaptive_avg_pool2d
2022-08-22 00:30:11 +08:00
mindspore.ops.adaptive_avg_pool3d
2022-04-20 15:38:23 +08:00
mindspore.ops.adaptive_max_pool3d
2022-05-19 17:55:27 +08:00
mindspore.ops.avg_pool2d
2022-09-01 17:17:29 +08:00
mindspore.ops.batch_norm
mindspore.ops.bias_add
2022-07-22 16:58:38 +08:00
mindspore.ops.ctc_greedy_decoder
2022-07-20 22:58:47 +08:00
mindspore.ops.conv2d
2022-06-21 15:56:28 +08:00
mindspore.ops.deformable_conv2d
2022-07-22 16:58:38 +08:00
mindspore.ops.dropout2d
mindspore.ops.dropout3d
mindspore.ops.flatten
2022-06-26 17:24:43 +08:00
mindspore.ops.interpolate
2022-07-22 16:58:38 +08:00
mindspore.ops.lrn
2022-06-28 20:24:07 +08:00
mindspore.ops.max_pool3d
2022-06-21 15:56:28 +08:00
mindspore.ops.kl_div
2022-06-06 20:37:22 +08:00
mindspore.ops.pad
2022-07-22 16:58:38 +08:00
mindspore.ops.padding
2022-05-19 16:29:07 +08:00
mindspore.ops.pdist
2022-08-27 10:55:12 +08:00
mindspore.ops.prelu
mindspore.ops.relu
mindspore.ops.relu6
2022-05-19 16:29:07 +08:00
2022-07-22 16:58:38 +08:00
损失函数
^^^^^^^^^^
.. mscnplatformautosummary ::
:toctree: ops
:nosignatures:
:template: classtemplate.rst
2022-09-01 17:17:29 +08:00
mindspore.ops.binary_cross_entropy
2022-07-22 16:58:38 +08:00
mindspore.ops.binary_cross_entropy_with_logits
mindspore.ops.cross_entropy
mindspore.ops.nll_loss
mindspore.ops.smooth_l1_loss
2022-03-31 16:40:42 +08:00
激活函数
^^^^^^^^^^
2022-03-08 16:20:55 +08:00
.. mscnplatformautosummary ::
:toctree: ops
:nosignatures:
:template: classtemplate.rst
2022-06-09 15:41:16 +08:00
mindspore.ops.celu
2022-06-15 09:57:01 +08:00
mindspore.ops.dropout
2022-04-27 16:58:30 +08:00
mindspore.ops.fast_gelu
2022-07-22 16:58:38 +08:00
mindspore.ops.gumbel_softmax
2022-05-24 20:47:57 +08:00
mindspore.ops.hardshrink
2022-06-09 10:51:38 +08:00
mindspore.ops.hardswish
2022-06-20 20:48:37 +08:00
mindspore.ops.log_softmax
2022-07-22 16:58:38 +08:00
mindspore.ops.mish
mindspore.ops.selu
2022-06-17 17:29:28 +08:00
mindspore.ops.soft_shrink
2022-06-13 21:58:02 +08:00
mindspore.ops.softmax
2022-07-05 15:38:55 +08:00
mindspore.ops.softsign
2022-03-08 16:20:55 +08:00
mindspore.ops.tanh
2022-03-31 16:40:42 +08:00
2022-07-22 16:58:38 +08:00
采样函数
2022-05-30 10:27:57 +08:00
^^^^^^^^^^
.. mscnplatformautosummary ::
:toctree: ops
:nosignatures:
:template: classtemplate.rst
operators doc: ApplyAdagradV2, GridSampler2D, GridSampler3D, PopulationCount, SparseApplyAdagrad,
SparseApplyAdagradV2, SparseApplyFtrl, Trunc, TruncateDiv, TruncateMod, UpsampleNearest3D, CTCGreedyDecoder
2022-07-19 01:38:59 +08:00
mindspore.ops.grid_sample
2022-07-22 16:58:38 +08:00
mindspore.ops.uniform_candidate_sampler
距离函数
^^^^^^^^^^
.. mscnplatformautosummary ::
:toctree: ops
:nosignatures:
:template: classtemplate.rst
mindspore.ops.cdist
2022-05-30 10:27:57 +08:00
2022-07-22 16:58:38 +08:00
数学运算函数
2022-09-05 15:41:10 +08:00
^^^^^^^^^^^^^^^^^
.. mscnplatformautosummary ::
:toctree: ops
:nosignatures:
:template: classtemplate.rst
mindspore.ops.bmm
2022-03-31 16:40:42 +08:00
逐元素运算
^^^^^^^^^^^^^
2022-03-08 16:20:55 +08:00
.. mscnplatformautosummary ::
:toctree: ops
:nosignatures:
:template: classtemplate.rst
mindspore.ops.abs
mindspore.ops.acos
mindspore.ops.acosh
mindspore.ops.add
mindspore.ops.addn
mindspore.ops.asin
mindspore.ops.asinh
mindspore.ops.atan
mindspore.ops.atan2
mindspore.ops.atanh
2022-05-24 12:08:23 +08:00
mindspore.ops.bernoulli
2022-05-05 16:44:44 +08:00
mindspore.ops.bessel_i0
mindspore.ops.bessel_i0e
2022-07-22 16:58:38 +08:00
mindspore.ops.bessel_i1
mindspore.ops.bessel_i1e
2022-05-05 16:44:44 +08:00
mindspore.ops.bessel_j0
mindspore.ops.bessel_j1
mindspore.ops.bessel_k0
mindspore.ops.bessel_k0e
2022-05-19 15:10:50 +08:00
mindspore.ops.bessel_k1
mindspore.ops.bessel_k1e
2022-07-22 16:58:38 +08:00
mindspore.ops.bessel_y0
mindspore.ops.bessel_y1
2022-03-08 16:20:55 +08:00
mindspore.ops.bitwise_and
mindspore.ops.bitwise_or
mindspore.ops.bitwise_xor
2022-06-09 17:24:53 +08:00
mindspore.ops.ceil
2022-03-08 16:20:55 +08:00
mindspore.ops.cos
mindspore.ops.cosh
mindspore.ops.div
mindspore.ops.erf
mindspore.ops.erfc
mindspore.ops.exp
mindspore.ops.expm1
mindspore.ops.floor
mindspore.ops.floor_div
mindspore.ops.floor_mod
2022-06-02 15:21:39 +08:00
mindspore.ops.inv
2022-03-08 16:20:55 +08:00
mindspore.ops.invert
2022-05-16 14:56:34 +08:00
mindspore.ops.lerp
2022-03-08 16:20:55 +08:00
mindspore.ops.log
2022-07-12 13:50:33 +08:00
mindspore.ops.log1p
2022-03-08 16:20:55 +08:00
mindspore.ops.logical_and
mindspore.ops.logical_not
mindspore.ops.logical_or
2022-07-20 09:53:54 +08:00
mindspore.ops.logit
2022-07-05 15:41:50 +08:00
mindspore.ops.log_matrix_determinant
mindspore.ops.matrix_determinant
2022-03-08 16:20:55 +08:00
mindspore.ops.mul
mindspore.ops.neg
mindspore.ops.pow
2022-05-10 16:26:31 +08:00
mindspore.ops.round
2022-03-08 16:20:55 +08:00
mindspore.ops.sin
mindspore.ops.sinh
2022-09-02 16:00:36 +08:00
mindspore.ops.sqrt
2022-09-02 14:33:37 +08:00
mindspore.ops.square
2022-03-08 16:20:55 +08:00
mindspore.ops.sub
2022-05-12 11:33:48 +08:00
mindspore.ops.svd
2022-03-08 16:20:55 +08:00
mindspore.ops.tan
operators doc: ApplyAdagradV2, GridSampler2D, GridSampler3D, PopulationCount, SparseApplyAdagrad,
SparseApplyAdagradV2, SparseApplyFtrl, Trunc, TruncateDiv, TruncateMod, UpsampleNearest3D, CTCGreedyDecoder
2022-07-19 01:38:59 +08:00
mindspore.ops.trunc
mindspore.ops.truncate_div
mindspore.ops.truncate_mod
2022-08-26 15:51:24 +08:00
mindspore.ops.xdivy
2022-06-30 21:02:14 +08:00
mindspore.ops.xlogy
2022-03-08 16:20:55 +08:00
2022-03-24 16:04:00 +08:00
.. list-table ::
:widths: 50 50
:header-rows: 1
* - functional
- Description
* - mindspore.ops.absolute
2022-03-08 16:20:55 +08:00
- `absolute` will be deprecated in the future. Please use `mindspore.ops.abs` instead.
2022-03-24 16:04:00 +08:00
* - mindspore.ops.floordiv
2022-03-08 16:20:55 +08:00
- `floordiv` will be deprecated in the future. Please use `mindspore.ops.floor_div` instead.
2022-03-24 16:04:00 +08:00
* - mindspore.ops.floormod
2022-03-08 16:20:55 +08:00
- `floormod` will be deprecated in the future. Please use `mindspore.ops.floor_mod` instead.
2022-03-24 16:04:00 +08:00
* - mindspore.ops.neg_tensor
2022-03-08 16:20:55 +08:00
- `neg_tensor` will be deprecated in the future. Please use `mindspore.ops.neg` instead.
2022-03-24 16:04:00 +08:00
* - mindspore.ops.pows
2022-03-08 16:20:55 +08:00
- `pows` will be deprecated in the future. Please use `mindspore.ops.pow` instead.
2022-03-31 16:40:42 +08:00
* - mindspore.ops.sqrt
- Refer to :class: `mindspore.ops.Sqrt` .
* - mindspore.ops.square
- Refer to :class: `mindspore.ops.Square` .
* - mindspore.ops.tensor_add
2022-03-08 16:20:55 +08:00
- `tensor_add` will be deprecated in the future. Please use `mindspore.ops.add` instead.
2022-03-31 16:40:42 +08:00
* - mindspore.ops.tensor_div
2022-03-08 16:20:55 +08:00
- `tensor_div` will be deprecated in the future. Please use `mindspore.ops.div` instead.
2022-03-31 16:40:42 +08:00
* - mindspore.ops.tensor_exp
2022-03-08 16:20:55 +08:00
- `tensor_exp` will be deprecated in the future. Please use `mindspore.ops.exp` instead.
2022-03-31 16:40:42 +08:00
* - mindspore.ops.tensor_expm1
2022-03-08 16:20:55 +08:00
- `tensor_expm1` will be deprecated in the future. Please use `mindspore.ops.expm1` instead.
2022-03-31 16:40:42 +08:00
* - mindspore.ops.tensor_floordiv
2022-03-08 16:20:55 +08:00
- `tensor_floordiv` will be deprecated in the future. Please use `mindspore.ops.floor_div` instead.
2022-03-31 16:40:42 +08:00
* - mindspore.ops.tensor_mod
2022-03-08 16:20:55 +08:00
- `tensor_mod` will be deprecated in the future. Please use `mindspore.ops.floor_mod` instead.
2022-03-31 16:40:42 +08:00
* - mindspore.ops.tensor_mul
2022-03-08 16:20:55 +08:00
- `tensor_mul` will be deprecated in the future. Please use `mindspore.ops.mul` instead.
2022-03-31 16:40:42 +08:00
* - mindspore.ops.tensor_pow
2022-03-08 16:20:55 +08:00
- `tensor_pow` will be deprecated in the future. Please use `mindspore.ops.pow` instead.
2022-03-31 16:40:42 +08:00
* - mindspore.ops.tensor_sub
2022-03-08 16:20:55 +08:00
- `tensor_sub` will be deprecated in the future. Please use `mindspore.ops.sub` instead.
2022-07-22 16:58:38 +08:00
Reduction函数
2022-03-31 16:40:42 +08:00
^^^^^^^^^^^^^
2022-05-26 16:49:00 +08:00
.. mscnplatformautosummary ::
:toctree: ops
:nosignatures:
:template: classtemplate.rst
2022-07-30 11:13:19 +08:00
mindspore.ops.amax
mindspore.ops.amin
2022-07-22 16:58:38 +08:00
mindspore.ops.argmin
2022-08-09 16:19:35 +08:00
mindspore.ops.cummax
mindspore.ops.cummin
2022-06-02 15:56:30 +08:00
mindspore.ops.logsumexp
2022-07-22 10:31:45 +08:00
mindspore.ops.max
2022-07-30 11:13:19 +08:00
mindspore.ops.mean
2022-08-04 14:48:08 +08:00
mindspore.ops.median
2022-07-22 16:03:56 +08:00
mindspore.ops.min
2022-07-30 11:13:19 +08:00
mindspore.ops.norm
mindspore.ops.prod
2022-05-26 16:49:00 +08:00
2022-03-31 16:40:42 +08:00
.. list-table ::
:widths: 50 50
:header-rows: 1
* - functional
- Description
2022-03-24 16:04:00 +08:00
* - mindspore.ops.reduce_sum
- Refer to :class: `mindspore.ops.ReduceSum` .
2022-07-06 17:52:50 +08:00
2022-07-22 16:58:38 +08:00
比较函数
2022-03-31 16:40:42 +08:00
^^^^^^^^^^^^^
2022-03-08 16:20:55 +08:00
.. mscnplatformautosummary ::
:toctree: ops
:nosignatures:
:template: classtemplate.rst
2022-07-20 21:14:43 +08:00
mindspore.ops.approximate_equal
2022-03-08 16:20:55 +08:00
mindspore.ops.equal
mindspore.ops.ge
mindspore.ops.gt
2022-05-16 18:50:05 +08:00
mindspore.ops.intopk
2022-06-11 15:19:28 +08:00
mindspore.ops.isclose
2022-03-08 16:20:55 +08:00
mindspore.ops.isfinite
mindspore.ops.isnan
mindspore.ops.le
mindspore.ops.less
mindspore.ops.maximum
mindspore.ops.minimum
2022-06-27 12:02:44 +08:00
mindspore.ops.ne
2022-03-08 16:20:55 +08:00
mindspore.ops.same_type_shape
2022-03-31 16:40:42 +08:00
.. list-table ::
:widths: 50 50
:header-rows: 1
* - functional
- Description
* - mindspore.ops.check_bprop
- Refer to :class: `mindspore.ops.CheckBprop` .
* - mindspore.ops.isinstance\_
2022-04-24 11:28:35 +08:00
- Refer to :class: `mindspore.ops.IsInstance` .
2022-03-31 16:40:42 +08:00
* - mindspore.ops.issubclass\_
- Refer to :class: `mindspore.ops.IsSubClass` .
* - mindspore.ops.not_equal
2022-03-08 16:20:55 +08:00
- `not_equal` will be deprecated in the future. Please use `mindspore.ops.ne` instead.
2022-03-31 16:40:42 +08:00
* - mindspore.ops.tensor_ge
2022-03-08 16:20:55 +08:00
- `tensor_ge` will be deprecated in the future. Please use `mindspore.ops.ge` instead.
2022-03-31 16:40:42 +08:00
* - mindspore.ops.tensor_gt
2022-03-08 16:20:55 +08:00
- `tensor_gt` will be deprecated in the future. Please use `mindspore.ops.gt` instead.
2022-03-31 16:40:42 +08:00
* - mindspore.ops.tensor_le
2022-03-08 16:20:55 +08:00
- `tensor_le` will be deprecated in the future. Please use `mindspore.ops.le` instead.
2022-03-31 16:40:42 +08:00
* - mindspore.ops.tensor_lt
2022-03-08 16:20:55 +08:00
- `tensor_lt` will be deprecated in the future. Please use `mindspore.ops.less` instead.
2022-07-06 17:52:50 +08:00
2022-07-22 16:58:38 +08:00
线性代数函数
2022-03-31 16:40:42 +08:00
^^^^^^^^^^^^^
.. mscnplatformautosummary ::
:toctree: ops
:nosignatures:
:template: classtemplate.rst
2022-07-22 16:58:38 +08:00
mindspore.ops.batch_dot
mindspore.ops.dot
2022-04-22 14:56:44 +08:00
mindspore.ops.matmul
2022-06-21 09:44:57 +08:00
mindspore.ops.matrix_solve
2022-04-27 16:58:30 +08:00
mindspore.ops.ger
2022-06-01 15:04:05 +08:00
mindspore.ops.renorm
2022-07-22 16:58:38 +08:00
mindspore.ops.tensor_dot
2022-03-31 16:40:42 +08:00
2022-07-22 16:58:38 +08:00
Tensor操作函数
2022-03-31 16:40:42 +08:00
----------------
Tensor创建
^^^^^^^^^^^^^
2022-03-08 16:20:55 +08:00
.. mscnplatformautosummary ::
:toctree: ops
:nosignatures:
:template: classtemplate.rst
2022-03-31 16:40:42 +08:00
2022-03-08 16:20:55 +08:00
mindspore.ops.eye
mindspore.ops.fill
2022-05-13 11:00:59 +08:00
mindspore.ops.fills
2022-06-20 19:21:03 +08:00
mindspore.ops.linspace
2022-07-22 16:58:38 +08:00
mindspore.ops.narrow
mindspore.ops.one_hot
2022-03-08 16:20:55 +08:00
mindspore.ops.ones
mindspore.ops.ones_like
mindspore.ops.zeros_like
2022-03-31 16:40:42 +08:00
2022-07-22 16:58:38 +08:00
随机生成函数
2022-03-31 16:40:42 +08:00
^^^^^^^^^^^^^^^^
.. mscnplatformautosummary ::
:toctree: ops
:nosignatures:
:template: classtemplate.rst
mindspore.ops.gamma
2022-07-22 16:58:38 +08:00
mindspore.ops.laplace
2022-03-31 16:40:42 +08:00
mindspore.ops.multinomial
2022-08-12 11:28:29 +08:00
mindspore.ops.poisson
2022-08-09 10:02:52 +08:00
mindspore.ops.random_poisson
2022-06-28 12:25:01 +08:00
mindspore.ops.random_categorical
2022-07-22 16:58:38 +08:00
mindspore.ops.random_gamma
2022-06-21 12:47:49 +08:00
mindspore.ops.standard_laplace
2022-06-27 21:50:28 +08:00
mindspore.ops.standard_normal
2022-07-22 16:58:38 +08:00
mindspore.ops.uniform
2022-03-31 16:40:42 +08:00
Array操作
^^^^^^^^^^^^^^^^
2022-03-08 16:20:55 +08:00
.. mscnplatformautosummary ::
:toctree: ops
:nosignatures:
:template: classtemplate.rst
2022-05-28 12:01:53 +08:00
mindspore.ops.adaptive_max_pool2d
2022-07-15 10:51:36 +08:00
mindspore.ops.affine_grid
2022-06-09 11:19:40 +08:00
mindspore.ops.batch_to_space_nd
mindspore.ops.broadcast_to
2022-06-09 20:10:00 +08:00
mindspore.ops.col2im
2022-06-17 10:49:17 +08:00
mindspore.ops.concat
2022-05-18 17:51:55 +08:00
mindspore.ops.diag
2022-06-27 12:02:44 +08:00
mindspore.ops.dyn_shape
2022-03-08 16:20:55 +08:00
mindspore.ops.expand_dims
mindspore.ops.gather
mindspore.ops.gather_d
2022-06-01 10:04:24 +08:00
mindspore.ops.gather_elements
2022-03-08 16:20:55 +08:00
mindspore.ops.gather_nd
2022-07-22 16:58:38 +08:00
mindspore.ops.index_add
2022-07-04 16:50:12 +08:00
mindspore.ops.index_fill
2022-07-22 16:58:38 +08:00
mindspore.ops.inplace_add
mindspore.ops.inplace_sub
mindspore.ops.inplace_update
2022-06-04 15:32:43 +08:00
mindspore.ops.masked_fill
2022-05-20 14:48:06 +08:00
mindspore.ops.masked_select
2022-06-02 15:21:39 +08:00
mindspore.ops.matrix_band_part
2022-05-26 09:17:20 +08:00
mindspore.ops.matrix_diag
2022-06-20 20:36:25 +08:00
mindspore.ops.matrix_diag_part
2022-07-16 09:43:41 +08:00
mindspore.ops.matrix_set_diag
2022-05-24 20:47:57 +08:00
mindspore.ops.meshgrid
2022-07-22 16:58:38 +08:00
mindspore.ops.normal
2022-05-09 15:32:15 +08:00
mindspore.ops.nonzero
operators doc: ApplyAdagradV2, GridSampler2D, GridSampler3D, PopulationCount, SparseApplyAdagrad,
SparseApplyAdagradV2, SparseApplyFtrl, Trunc, TruncateDiv, TruncateMod, UpsampleNearest3D, CTCGreedyDecoder
2022-07-19 01:38:59 +08:00
mindspore.ops.population_count
2022-05-12 15:13:58 +08:00
mindspore.ops.range
2022-03-08 16:20:55 +08:00
mindspore.ops.rank
2022-07-22 16:58:38 +08:00
mindspore.ops.repeat_elements
2022-03-08 16:20:55 +08:00
mindspore.ops.reshape
2022-08-10 21:54:21 +08:00
mindspore.ops.reverse_sequence
2022-03-08 16:20:55 +08:00
mindspore.ops.scatter_nd
mindspore.ops.select
2022-07-22 16:58:38 +08:00
mindspore.ops.sequence_mask
2022-03-08 16:20:55 +08:00
mindspore.ops.shape
mindspore.ops.size
2022-06-27 12:02:44 +08:00
mindspore.ops.slice
2022-05-26 11:02:27 +08:00
mindspore.ops.space_to_batch_nd
2022-07-15 10:02:56 +08:00
mindspore.ops.sparse_segment_mean
2022-06-17 14:28:33 +08:00
mindspore.ops.split
2022-07-22 14:36:29 +08:00
mindspore.ops.squeeze
2022-07-12 13:50:33 +08:00
mindspore.ops.stack
2022-04-21 09:42:04 +08:00
mindspore.ops.tensor_scatter_add
2022-05-05 18:50:43 +08:00
mindspore.ops.tensor_scatter_div
2022-06-14 16:30:01 +08:00
mindspore.ops.tensor_scatter_max
mindspore.ops.tensor_scatter_min
2022-05-26 11:02:27 +08:00
mindspore.ops.tensor_scatter_mul
mindspore.ops.tensor_scatter_sub
2022-06-26 16:40:45 +08:00
mindspore.ops.tensor_scatter_elements
2022-03-08 16:20:55 +08:00
mindspore.ops.tile
2022-07-22 17:08:36 +08:00
mindspore.ops.top_k
2022-03-08 16:20:55 +08:00
mindspore.ops.transpose
mindspore.ops.unique
2022-05-17 11:37:00 +08:00
mindspore.ops.unique_consecutive
2022-06-16 16:21:05 +08:00
mindspore.ops.unique_with_pad
2022-07-22 16:58:38 +08:00
mindspore.ops.unsorted_segment_max
mindspore.ops.unsorted_segment_min
mindspore.ops.unsorted_segment_prod
2022-07-09 20:06:34 +08:00
mindspore.ops.unsorted_segment_sum
2022-07-12 13:50:33 +08:00
mindspore.ops.unstack
2022-03-08 16:20:55 +08:00
2022-03-31 16:40:42 +08:00
.. list-table ::
:widths: 50 50
:header-rows: 1
* - functional
- Description
* - mindspore.ops.cast
- Refer to :class: `mindspore.ops.Cast` .
* - mindspore.ops.cumprod
- Refer to :class: `mindspore.ops.CumProd` .
* - mindspore.ops.cumsum
- Refer to :class: `mindspore.ops.CumSum` .
* - mindspore.ops.dtype
- Refer to :class: `mindspore.ops.DType` .
* - mindspore.ops.sort
- Refer to :class: `mindspore.ops.Sort` .
* - mindspore.ops.strided_slice
- Refer to :class: `mindspore.ops.StridedSlice` .
* - mindspore.ops.tensor_scatter_update
- Refer to :class: `mindspore.ops.TensorScatterUpdate` .
* - mindspore.ops.tensor_slice
2022-03-08 16:20:55 +08:00
- `tensor_slice` will be deprecated in the future. Please use `mindspore.ops.slice` instead.
类型转换
^^^^^^^^^^^^^^^^
2022-03-31 16:40:42 +08:00
.. mscnplatformautosummary ::
:toctree: ops
:nosignatures:
:template: classtemplate.rst
2022-03-08 16:20:55 +08:00
mindspore.ops.scalar_cast
mindspore.ops.scalar_to_array
mindspore.ops.scalar_to_tensor
mindspore.ops.tuple_to_array
2022-03-31 16:40:42 +08:00
2022-07-22 16:58:38 +08:00
稀疏函数
2022-06-15 15:10:38 +08:00
^^^^^^^^^^^^^^^^
.. mscnplatformautosummary ::
:toctree: ops
:nosignatures:
:template: classtemplate.rst
mindspore.ops.dense_to_sparse_coo
mindspore.ops.dense_to_sparse_csr
2022-08-29 16:43:03 +08:00
mindspore.ops.csr_add
2022-08-02 17:26:24 +08:00
mindspore.ops.csr_softmax
2022-07-06 15:59:58 +08:00
mindspore.ops.csr_to_coo
2022-07-20 16:31:56 +08:00
mindspore.ops.sparse_add
2022-06-15 15:10:38 +08:00
2022-07-22 16:58:38 +08:00
梯度剪裁
2022-07-28 11:58:35 +08:00
^^^^^^^^
2022-07-22 16:58:38 +08:00
.. mscnplatformautosummary ::
:toctree: ops
:nosignatures:
:template: classtemplate.rst
mindspore.ops.clip_by_global_norm
mindspore.ops.clip_by_value
Parameter操作函数
2022-04-16 09:53:22 +08:00
--------------------
2022-03-08 16:20:55 +08:00
.. mscnplatformautosummary ::
:toctree: ops
:nosignatures:
:template: classtemplate.rst
mindspore.ops.assign
mindspore.ops.assign_add
mindspore.ops.assign_sub
2022-06-27 15:52:29 +08:00
mindspore.ops.scatter_add
2022-05-25 15:38:29 +08:00
mindspore.ops.scatter_div
2022-05-20 14:32:08 +08:00
mindspore.ops.scatter_max
2022-07-27 11:10:10 +08:00
mindspore.ops.scatter_min
mindspore.ops.scatter_mul
2022-05-20 14:50:52 +08:00
mindspore.ops.scatter_nd_add
2022-06-22 10:24:44 +08:00
mindspore.ops.scatter_nd_div
2022-06-01 17:46:08 +08:00
mindspore.ops.scatter_nd_max
2022-06-22 10:24:44 +08:00
mindspore.ops.scatter_nd_min
2022-06-01 17:46:08 +08:00
mindspore.ops.scatter_nd_mul
2022-05-20 14:50:52 +08:00
mindspore.ops.scatter_nd_sub
2022-05-31 11:46:39 +08:00
mindspore.ops.scatter_update
2022-03-08 16:20:55 +08:00
2022-07-22 16:58:38 +08:00
微分函数
----------------
.. mscnplatformautosummary ::
:toctree: ops
:nosignatures:
:template: classtemplate.rst
mindspore.ops.derivative
mindspore.ops.grad
2022-08-09 15:17:47 +08:00
mindspore.ops.value_and_grad
2022-07-22 16:58:38 +08:00
mindspore.ops.jet
mindspore.ops.jvp
mindspore.ops.vjp
mindspore.ops.vmap
调试函数
2022-04-16 09:53:22 +08:00
----------------
2022-08-25 15:21:51 +08:00
.. mscnplatformautosummary ::
:toctree: ops
:nosignatures:
:template: classtemplate.rst
mindspore.ops.print_
2022-04-16 09:53:22 +08:00
2022-07-06 17:52:50 +08:00
2022-07-22 16:58:38 +08:00
其他函数
2022-03-31 16:40:42 +08:00
----------------
.. list-table ::
:widths: 50 50
:header-rows: 1
* - functional
- Description
* - mindspore.ops.bool_and
- Calculate the result of logical AND operation. (Usage is the same as "and" in Python)
* - mindspore.ops.bool_eq
- Determine whether the Boolean values are equal. (Usage is the same as "==" in Python)
* - mindspore.ops.bool_not
- Calculate the result of logical NOT operation. (Usage is the same as "not" in Python)
* - mindspore.ops.bool_or
- Calculate the result of logical OR operation. (Usage is the same as "or" in Python)
* - mindspore.ops.depend
- Refer to :class: `mindspore.ops.Depend` .
* - mindspore.ops.in_dict
- Determine if a str in dict.
* - mindspore.ops.is_not
- Determine whether the input is not the same as the other one. (Usage is the same as "is not" in Python)
* - mindspore.ops.is\_
- Determine whether the input is the same as the other one. (Usage is the same as "is" in Python)
* - mindspore.ops.isconstant
- Determine whether the object is constant.
* - mindspore.ops.not_in_dict
- Determine whether the object is not in the dict.
* - mindspore.ops.partial
- Refer to :class: `mindspore.ops.Partial` .
* - mindspore.ops.scalar_add
- Get the sum of two numbers. (Usage is the same as "+" in Python)
2022-03-24 16:04:00 +08:00
* - mindspore.ops.scalar_div
- Get the quotient of dividing the first input number by the second input number. (Usage is the same as "/" in Python)
* - mindspore.ops.scalar_eq
- Determine whether two numbers are equal. (Usage is the same as "==" in Python)
* - mindspore.ops.scalar_floordiv
- Divide the first input number by the second input number and round down to the closest integer. (Usage is the same as "//" in Python)
* - mindspore.ops.scalar_ge
- Determine whether the number is greater than or equal to another number. (Usage is the same as ">=" in Python)
* - mindspore.ops.scalar_gt
- Determine whether the number is greater than another number. (Usage is the same as ">" in Python)
* - mindspore.ops.scalar_le
- Determine whether the number is less than or equal to another number. (Usage is the same as "<=" in Python)
* - mindspore.ops.scalar_log
- Get the natural logarithm of the input number.
* - mindspore.ops.scalar_lt
- Determine whether the number is less than another number. (Usage is the same as "<" in Python)
* - mindspore.ops.scalar_mod
- Get the remainder of dividing the first input number by the second input number. (Usage is the same as "%" in Python)
* - mindspore.ops.scalar_mul
- Get the product of the input two numbers. (Usage is the same as "*" in Python)
* - mindspore.ops.scalar_ne
- Determine whether two numbers are not equal. (Usage is the same as "!=" in Python)
* - mindspore.ops.scalar_pow
- Compute a number to the power of the second input number.
* - mindspore.ops.scalar_sub
- Subtract the second input number from the first input number. (Usage is the same as "-" in Python)
* - mindspore.ops.scalar_uadd
- Get the positive value of the input number.
* - mindspore.ops.scalar_usub
- Get the negative value of the input number.
* - mindspore.ops.shape_mul
- The input of shape_mul must be shape multiply elements in tuple(shape).
* - mindspore.ops.stop_gradient
2022-04-28 16:31:27 +08:00
- Disable update during back propagation. (`stop_gradient <https://www.mindspore.cn/tutorials/en/master/beginner/autograd.html#stopping-gradient-calculation> `_ )
2022-03-24 16:04:00 +08:00
* - mindspore.ops.string_concat
- Concatenate two strings.
* - mindspore.ops.string_eq
- Determine if two strings are equal.
* - mindspore.ops.typeof
- Get type of object.
.. mscnplatformautosummary ::
:toctree: ops
:nosignatures:
:template: classtemplate.rst
mindspore.ops.arange
mindspore.ops.core
mindspore.ops.count_nonzero
2022-07-22 16:58:38 +08:00