update max_unpool2d/3d doc

This commit is contained in:
Corleone 2023-02-27 15:27:32 +08:00
parent d0c9b9a735
commit d0c557872c
8 changed files with 16 additions and 18 deletions

View File

@ -3,8 +3,8 @@ mindspore.nn.MaxUnpool2d
.. py:class:: mindspore.nn.MaxUnpool2d(kernel_size, stride=None, padding=0) .. py:class:: mindspore.nn.MaxUnpool2d(kernel_size, stride=None, padding=0)
`MaxPool2d`部分逆过程。 `MaxPool2d` 不是完全可逆的,因为非最大值丢失。 :class`mindspore.nn.MaxPool2d` 的逆过程。
`MaxUnpool2d` `MaxPool2d` 的输出为输入,包括最大值的索引。在计算 `MaxPool2d` 部分逆的过程中,非最大值设置为零 `MaxUnpool2d` 在计算过程中保留最大值位置的元素并将非最大值位置元素设置为0
支持的输入数据格式为 :math:`(N, C, H_{in}, W_{in})`:math:`(C, H_{in}, W_{in})` 支持的输入数据格式为 :math:`(N, C, H_{in}, W_{in})`:math:`(C, H_{in}, W_{in})`
输出数据的个格式为 :math:`(N, C, H_{out}, W_{out})`:math:`(C, H_{out}, W_{out})` ,计算公式如下: 输出数据的个格式为 :math:`(N, C, H_{out}, W_{out})`:math:`(C, H_{out}, W_{out})` ,计算公式如下:

View File

@ -3,8 +3,8 @@ mindspore.nn.MaxUnpool3d
.. py:class:: mindspore.nn.MaxUnpool3d(kernel_size, stride=None, padding=0) .. py:class:: mindspore.nn.MaxUnpool3d(kernel_size, stride=None, padding=0)
`MaxPool3d`部分逆过程。 `MaxPool3d` 不是完全可逆的,因为非最大值丢失。 :class`mindspore.nn.MaxPool3d` 的逆过程。
`MaxUnpool3d` `MaxPool3d` 的输出为输入,包括最大值的索引。在计算 `MaxPool3d` 部分逆的过程中,非最大值设置为零 `MaxUnpool3d` 在计算逆的过程中保留最大值位置的元素并将非最大值位置元素设置为0
支持的输入数据格式为 :math:`(N, C, D_{in}, H_{in}, W_{in})`:math:`(C, D_{in}, H_{in}, W_{in})` 支持的输入数据格式为 :math:`(N, C, D_{in}, H_{in}, W_{in})`:math:`(C, D_{in}, H_{in}, W_{in})`
输出数据的个格式为 :math:`(N, C, D_{out}, H_{out}, W_{out})`:math:`(C, D_{out}, H_{out}, W_{out})` ,计算公式如下: 输出数据的个格式为 :math:`(N, C, D_{out}, H_{out}, W_{out})`:math:`(C, D_{out}, H_{out}, W_{out})` ,计算公式如下:

View File

@ -3,11 +3,9 @@ mindspore.ops.MaxUnpool2D
.. py:class:: mindspore.ops.MaxUnpool2D(ksize, strides=0, pads=0, output_shape=(), data_format="NCHW") .. py:class:: mindspore.ops.MaxUnpool2D(ksize, strides=0, pads=0, output_shape=(), data_format="NCHW")
计算MaxPool2D的部分逆。 MaxPool2D的逆过程
MaxPool2D不是完全可逆的因为一些非最大值丢失了。 MaxUnpool2D在计算过程中保留最大值位置的元素并将非最大值位置元素设置为0。
MaxUnpool2D将MaxPool2D的输出作为输入(包括最大值的索引)并计算一个部分逆其中的所有非最大值被设置为0。
例如输入的shape为 :math:`(N, C, H_{in}, W_{in})` 输出的shape为 :math:`(N, C, H_{out}, W_{out})` 例如输入的shape为 :math:`(N, C, H_{in}, W_{in})` 输出的shape为 :math:`(N, C, H_{out}, W_{out})`
则该操作如下式所示: 则该操作如下式所示:

View File

@ -3,8 +3,8 @@ mindspore.ops.max_unpool2d
.. py:function:: mindspore.ops.max_unpool2d(x, indices, kernel_size, stride=None, padding=0, output_size=None) .. py:function:: mindspore.ops.max_unpool2d(x, indices, kernel_size, stride=None, padding=0, output_size=None)
`maxpool2d`部分逆过程。 `maxpool2d` 不是完全可逆的,因为非最大值丢失。 `max_pool2d` 的逆过程。
`max_unpool2d` `maxpool2d` 的输出为输入,包括最大值的索引。在计算 `maxpool2d` 部分逆的过程中,非最大值设置为零 `max_unpool2d` 在计算过程中保留最大值位置的元素并将非最大值位置元素设置为0
支持的输入数据格式为 :math:`(N, C, H_{in}, W_{in})`:math:`(C, H_{in}, W_{in})` 支持的输入数据格式为 :math:`(N, C, H_{in}, W_{in})`:math:`(C, H_{in}, W_{in})`
输出数据的个格式为 :math:`(N, C, H_{out}, W_{out})`:math:`(C, H_{out}, W_{out})` ,计算公式如下: 输出数据的个格式为 :math:`(N, C, H_{out}, W_{out})`:math:`(C, H_{out}, W_{out})` ,计算公式如下:

View File

@ -3,8 +3,8 @@ mindspore.ops.max_unpool3d
.. py:function:: mindspore.ops.max_unpool3d(x, indices, kernel_size, stride=None, padding=0, output_size=None) .. py:function:: mindspore.ops.max_unpool3d(x, indices, kernel_size, stride=None, padding=0, output_size=None)
`maxpool3d` 的部分逆过程。 `maxpool3d` 不是完全可逆的,因为非最大值丢失 :func:`mindspore.ops.max_pool3d` 的逆过程
`max_unpool3d` `maxpool3d` 的输出为输入,包括最大值的索引。在计算 `maxpool3d` 部分逆的过程中,非最大值设置为零 `max_unpool3d` 在计算过程中保留最大值位置的元素并将非最大值位置元素设置为0
支持的输入数据格式为 :math:`(N, C, D_{in}, H_{in}, W_{in})`:math:`(C, D_{in}, H_{in}, W_{in})` 支持的输入数据格式为 :math:`(N, C, D_{in}, H_{in}, W_{in})`:math:`(C, D_{in}, H_{in}, W_{in})`
输出数据的个格式为 :math:`(N, C, D_{out}, H_{out}, W_{out})`:math:`(C, D_{out}, H_{out}, W_{out})` ,计算公式如下: 输出数据的个格式为 :math:`(N, C, D_{out}, H_{out}, W_{out})`:math:`(C, D_{out}, H_{out}, W_{out})` ,计算公式如下:

View File

@ -1470,7 +1470,7 @@ class MaxUnpool1d(Cell):
class MaxUnpool2d(Cell): class MaxUnpool2d(Cell):
r""" r"""
Computes inverse of MaxPool2d. Computes the inverse of :class`mindspore.nn.MaxPool2d`.
MaxUnpool2d keeps the maximal value and set all position of non-maximal values to zero. Typically the input MaxUnpool2d keeps the maximal value and set all position of non-maximal values to zero. Typically the input
is of shape :math:`(N, C, H_{in}, W_{in})` or :math:`(C, H_{in}, W_{in})`, and the output is of is of shape :math:`(N, C, H_{in}, W_{in})` or :math:`(C, H_{in}, W_{in})`, and the output is of
@ -1557,7 +1557,7 @@ class MaxUnpool2d(Cell):
class MaxUnpool3d(Cell): class MaxUnpool3d(Cell):
r""" r"""
Computes inverse of MaxPool3d. Computes the inverse of :class`mindspore.nn.MaxPool3d`.
MaxUnpool3d keeps the maximal value and set all position of non-maximal values to zero. MaxUnpool3d keeps the maximal value and set all position of non-maximal values to zero.
Typically the input is of shape :math:`(N, C, D_{in}, H_{in}, W_{in})` or :math:`(C, D_{in}, H_{in}, W_{in})`, Typically the input is of shape :math:`(N, C, D_{in}, H_{in}, W_{in})` or :math:`(C, D_{in}, H_{in}, W_{in})`,

View File

@ -864,7 +864,7 @@ def max_unpool1d(x, indices, kernel_size, stride=None, padding=0, output_size=No
def max_unpool2d(x, indices, kernel_size, stride=None, padding=0, output_size=None): def max_unpool2d(x, indices, kernel_size, stride=None, padding=0, output_size=None):
r""" r"""
Computes inverse of maxpool2d. Computes the inverse of max_pool2d.
max_unpool2d keeps the maximal value and set all position of non-maximal values to zero. Typically the input max_unpool2d keeps the maximal value and set all position of non-maximal values to zero. Typically the input
is of shape :math:`(N, C, H_{in}, W_{in})` or :math:`(C, H_{in}, W_{in})`, and the output is of is of shape :math:`(N, C, H_{in}, W_{in})` or :math:`(C, H_{in}, W_{in})`, and the output is of
@ -968,7 +968,7 @@ def max_unpool2d(x, indices, kernel_size, stride=None, padding=0, output_size=No
def max_unpool3d(x, indices, kernel_size, stride=None, padding=0, output_size=None): def max_unpool3d(x, indices, kernel_size, stride=None, padding=0, output_size=None):
r""" r"""
Computes inverse of maxpool3d. Computes the inverse of :func:`mindspore.ops.max_pool3d`.
max_unpool3d keeps the maximal value and set all position of non-maximal values to zero. max_unpool3d keeps the maximal value and set all position of non-maximal values to zero.
Typically the input is of shape :math:`(N, C, D_{in}, H_{in}, W_{in})` or :math:`(C, D_{in}, H_{in}, W_{in})`, Typically the input is of shape :math:`(N, C, D_{in}, H_{in}, W_{in})` or :math:`(C, D_{in}, H_{in}, W_{in})`,

View File

@ -2001,7 +2001,7 @@ class MaxPool3D(Primitive):
class MaxUnpool2D(Primitive): class MaxUnpool2D(Primitive):
r""" r"""
Computes inverse of MaxPool2D. Computes the inverse of MaxPool2D.
MaxUnpool2D keeps the maximal value and set all position of non-maximal values to zero. MaxUnpool2D keeps the maximal value and set all position of non-maximal values to zero.
Typically the input is of shape :math:`(N, C, H_{in}, W_{in})` , the output is of Typically the input is of shape :math:`(N, C, H_{in}, W_{in})` , the output is of
@ -2101,7 +2101,7 @@ class MaxUnpool2D(Primitive):
class MaxUnpool3D(Primitive): class MaxUnpool3D(Primitive):
r""" r"""
Computes inverse of MaxUnpool3D. Computes the inverse of :class:`mindspore.ops.MaxPool3D`.
MaxUnpool3D keeps the maximal value and set all position of non-maximal values to zero. MaxUnpool3D keeps the maximal value and set all position of non-maximal values to zero.
Typically the input is of shape :math:`(N, C, D_{in}, H_{in}, W_{in})`, the output is of Typically the input is of shape :math:`(N, C, D_{in}, H_{in}, W_{in})`, the output is of