forked from mindspore-Ecosystem/mindspore
!35669 Fix the formula in the docs of deformable_conv2d
Merge pull request !35669 from YuJianfeng/code_docs
This commit is contained in:
commit
705bfca13a
|
@ -3,12 +3,14 @@ mindspore.ops.deformable_conv2d
|
|||
|
||||
.. py:function:: mindspore.ops.deformable_conv2d(x, weight, offsets, kernel_size, strides, padding, bias=None, dilations=(1, 1, 1, 1), groups=1, deformable_groups=1, modulated=True)
|
||||
|
||||
给定4D的Tensor输入`x` , `weight` 和 `offsets` ,计算一个2D的可变形卷积。可变形卷积运算可以表达如下:
|
||||
给定4D的Tensor输入 `x` , `weight` 和 `offsets` ,计算一个2D的可变形卷积。可变形卷积运算可以表达如下:
|
||||
可变形卷积v1:
|
||||
|
||||
.. math::
|
||||
y(p)=\sum_{k=1}^{K}w_{k}\cdot x(p+p_{k}+\Delta{p_{k}})
|
||||
|
||||
可变形卷积v2:
|
||||
|
||||
.. math::
|
||||
y(p)=\sum_{k=1}^{K}w_{k}\cdot x(p+p_{k}+\Delta{p_{k}})\cdot \Delta{m_{k}}
|
||||
|
||||
|
@ -31,6 +33,7 @@ mindspore.ops.deformable_conv2d
|
|||
**返回:**
|
||||
|
||||
Tensor,一个四维Tensor,表示输出特征图。数据类型与 `x` 相同,数据格式为"NCHW",shape为 :math:`(N, C_{out}, H_{out}, W_{out})` 。
|
||||
|
||||
.. math::
|
||||
\begin{array}{ll} \\
|
||||
H_{out} = \left \lfloor{\frac{H_{in} + padding[0] + padding[1] - (H_{f} - 1) \times
|
||||
|
|
|
@ -277,10 +277,12 @@ def deformable_conv2d(x, weight, offsets, kernel_size, strides, padding, bias=No
|
|||
Given 4D tensor inputs `x`, `weight` and `offsets`, compute a 2D deformable convolution. The deformable convolution
|
||||
operation can be expressed as follow:
|
||||
Deformable Convolution v1:
|
||||
|
||||
.. math::
|
||||
y(p)=\sum_{k=1}^{K}w_{k}\cdot x(p+p_{k}+\Delta{p_{k}})
|
||||
|
||||
Deformable Convolution v2:
|
||||
|
||||
.. math::
|
||||
y(p)=\sum_{k=1}^{K}w_{k}\cdot x(p+p_{k}+\Delta{p_{k}})\cdot \Delta{m_{k}}
|
||||
|
||||
|
@ -317,6 +319,7 @@ def deformable_conv2d(x, weight, offsets, kernel_size, strides, padding, bias=No
|
|||
Returns:
|
||||
Tensor, A 4D Tensor of output feature map. With the same type as `x`. With the format "NCHW",
|
||||
the shape is :math:`(N, C_{out}, H_{out}, W_{out})`.
|
||||
|
||||
.. math::
|
||||
\begin{array}{ll} \\
|
||||
H_{out} = \left \lfloor{\frac{H_{in} + padding[0] + padding[1] - (H_{f} - 1) \times
|
||||
|
|
Loading…
Reference in New Issue