forked from mindspore-Ecosystem/mindspore
commit
ab435f04f7
|
@ -1,7 +1,7 @@
|
|||
mindspore.ops.aminmax
|
||||
======================
|
||||
|
||||
.. py:function:: mindspore.ops.aminmax(x, *, axis=0, keep_dims=False)
|
||||
.. py:function:: mindspore.ops.aminmax(x, *, axis=0, keepdims=False)
|
||||
|
||||
返回输入Tensor在指定轴上的最小值和最大值。
|
||||
|
||||
|
@ -10,7 +10,7 @@ mindspore.ops.aminmax
|
|||
|
||||
关键字参数:
|
||||
- **axis** (int,可选) - 要进行规约计算的维度。 `axis` 必须在[-rank, rank)范围内,其中 “rank” 是 `x` 的维度。默认值:0。
|
||||
- **keep_dims** (bool,可选) - 是否保留维度。如果为True,则输出shape与输入shape一致,否则移除规约计算的维度 `axis` 。默认值:False。
|
||||
- **keepdims** (bool,可选) - 是否保留维度。如果为True,则输出shape与输入shape一致,否则移除规约计算的维度 `axis` 。默认值:False。
|
||||
|
||||
返回:
|
||||
tuple (Tensor),包含输入Tensor在指定轴上的最小值和最大值。
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
mindspore.ops.cat
|
||||
=================
|
||||
==================
|
||||
|
||||
.. py:function:: mindspore.ops.cat(tensors, axis=0)
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ mindspore.ops.count_nonzero
|
|||
计算输入Tensor指定轴上的非零元素的数量。如果没有指定维度,则计算Tensor中所有非零元素的数量。
|
||||
|
||||
.. note::
|
||||
`dims` 的值范围是[-x_dims,x_dims)。其中, `x_dims` 是输入 `x` 的维度。
|
||||
`dims` 的值范围是[-x_dims,x_dims)。其中, `x_dims` 是输入 `x` 的维度。
|
||||
|
||||
参数:
|
||||
- **x** (Tensor) - 要计算的输入,可以是任意维度的Tensor。将输入张量的shape设为 :math:`(x_1, x_2, ..., x_N)` 。
|
||||
|
|
|
@ -13,9 +13,9 @@ mindspore.ops.depend
|
|||
b = B(y) ---> y = depend(y, a)
|
||||
---> b = B(y)
|
||||
|
||||
输入:
|
||||
参数:
|
||||
- **value** (Tensor) - 应被Depend操作符返回的Tensor。
|
||||
- **expr** (Expression) - 应被执行的无输出的表达式。
|
||||
|
||||
输出:
|
||||
返回:
|
||||
Tensor,作为 `value` 传入的变量。
|
|
@ -5,9 +5,9 @@ mindspore.ops.partial
|
|||
|
||||
生成偏函数的实例。通过给一般函数的部分参数提供初始值来衍生出有特定功能的新函数。
|
||||
|
||||
输入:
|
||||
参数:
|
||||
- **func** (FunctionType) - 需传入的函数。
|
||||
- **args** (Tensor) - 传入的函数所对应的参数。
|
||||
|
||||
输出:
|
||||
返回:
|
||||
FunctionType,偏函数及其对应的参数。
|
|
@ -87,7 +87,7 @@ Recurrent Layer
|
|||
Transformer Layer
|
||||
---------------------------
|
||||
|
||||
.. mscnplatformautosummary::
|
||||
.. msplatformautosummary::
|
||||
:toctree: nn
|
||||
:nosignatures:
|
||||
:template: classtemplate.rst
|
||||
|
|
|
@ -1016,7 +1016,7 @@ def set_context(**kwargs):
|
|||
memory_optimize_level is set 'O1'.
|
||||
- OFF: Turn off the memory Offload function.
|
||||
ascend_config (dict): Set the parameters specific to Ascend hardware platform. It is not set by default.
|
||||
Currently, only setting `precision_mode' and jit_compile are supported on Ascend910B hardware platform.
|
||||
Currently, only setting `precision_mode` and `jit_compile` are supported on Ascend910B hardware platform.
|
||||
|
||||
- precision_mode (str): Mixed precision mode setting, on Ascend910B hardware platform, the default
|
||||
value of training network is must_keep_origin_dtype, and the default value of inference network
|
||||
|
@ -1042,6 +1042,7 @@ def set_context(**kwargs):
|
|||
the built-in optimization strategy, automatically reduces the precision of some operators to bfloat16.
|
||||
|
||||
- jit_compile (bool): Whether to select online compilation. Default: True.
|
||||
|
||||
Raises:
|
||||
ValueError: If input key is not an attribute in context.
|
||||
|
||||
|
|
|
@ -24,11 +24,11 @@ def partial(func, *args):
|
|||
Makes a partial function instance. Partial function can be used to derived specialized
|
||||
functions from general functions by fixing the value of certain arguments.
|
||||
|
||||
Inputs:
|
||||
Args:
|
||||
func (FunctionType): The incoming function.
|
||||
args (Tensor): The arguments of the incoming function.
|
||||
|
||||
Outputs:
|
||||
Returns:
|
||||
FunctionType, partial function bound with arguments.
|
||||
|
||||
Supported Platforms:
|
||||
|
@ -67,11 +67,11 @@ def depend(value, expr):
|
|||
b = B(y) ---> y = depend(y, a)
|
||||
---> b = B(y)
|
||||
|
||||
Inputs:
|
||||
Args:
|
||||
value (Tensor): The real value to return for depend operator.
|
||||
expr (Expression): The expression to execute with no outputs.
|
||||
|
||||
Outputs:
|
||||
Returns:
|
||||
Tensor, the value passed by last operator.
|
||||
|
||||
Supported Platforms:
|
||||
|
|
Loading…
Reference in New Issue