提交 f40df602 编写于 作者: M Megvii Engine Team 提交者: huangxinda

docs(mge): refactor docs to remove warnings

GitOrigin-RevId: efefc2a4a21027600d1ac3156c648bb987d039e4
上级 1040b778
......@@ -24,7 +24,7 @@ if os.getenv("MEGENGINE_CONV_EXECUTION_STRATEGY") != None:
def get_execution_strategy() -> Strategy:
"""
Returns the execution strategy of :class:`~.Conv2d` and :func:'~.matmul'
Returns the execution strategy of :class:`~module..Conv2d` and :func:`~.matmul`
See :func:`~.set_execution_strategy` for possible return values
"""
......@@ -33,9 +33,9 @@ def get_execution_strategy() -> Strategy:
def set_execution_strategy(option):
"""
Sets the execution strategy of :class:`~.Conv2d` and :func:'~.matmul'
Sets the execution strategy of :class:`~module.Conv2d` and :func:`~.matmul`
:param option: Decides how :class:`~.Conv2d`and :func:'~.matmul' algorithms are chosen.
:param option: Decides how :class:`~module.Conv2d`and :func:`~.matmul` algorithms are chosen.
Available value Strategy
* HEURISTIC uses heuristic to choose the fastest algorithm.
* PROFILE runs possible algorithms on real device to find the best one.
......
......@@ -144,9 +144,9 @@ class Conv1d(_ConvNd):
.. note::
:attr:`weight` usually has shape ``(out_channels, in_channels, kernel_size)``,
if groups is not 1, shape will be ``(groups, out_channels // groups, in_channels // groups, kernel_size)``
:attr:`bias` usually has shape ``(1, out_channels, 1)``
* ``weight`` usually has shape ``(out_channels, in_channels, kernel_size)`` ,
if groups is not 1, shape will be ``(groups, out_channels // groups, in_channels // groups, kernel_size)``
* ``bias`` usually has shape ``(1, out_channels, 1)``
Examples:
......@@ -309,9 +309,9 @@ class Conv2d(_ConvNd):
.. note::
:attr:`weight` usually has shape ``(out_channels, in_channels, height, width)``,
if groups is not 1, shape will be ``(groups, out_channels // groups, in_channels // groups, height, width)``
:attr:`bias` usually has shape ``(1, out_channels, *1)``
* ``weight`` usually has shape ``(out_channels, in_channels, height, width)`` ,
if groups is not 1, shape will be ``(groups, out_channels // groups, in_channels // groups, height, width)``
* ``bias`` usually has shape ``(1, out_channels, *1)``
Examples:
......@@ -455,9 +455,9 @@ class Conv3d(_ConvNd):
.. note::
:attr:`weight` usually has shape ``(out_channels, in_channels, depth, height, width)``,
if groups is not 1, shape will be ``(groups, out_channels // groups, in_channels // groups, depth, height, width)``
:attr:`bias` usually has shape ``(1, out_channels, *1)``
* ``weight`` usually has shape ``(out_channels, in_channels, depth, height, width)`` ,
if groups is not 1, shape will be ``(groups, out_channels // groups, in_channels // groups, depth, height, width)``
* ``bias`` usually has shape ``(1, out_channels, *1)``
Examples:
......@@ -587,9 +587,10 @@ class ConvTranspose2d(_ConvNd):
.. note::
:attr:`weight` usually has shape ``(in_channels, out_channels, height, width)``,
if groups is not 1, shape will be ``(groups, in_channels // groups, out_channels // groups, height, width)``
:attr:`bias` usually has shape ``(1, out_channels, *1)``
* ``weight`` usually has shape ``(in_channels, out_channels, height, width)`` ,
if groups is not 1, shape will be ``(groups, in_channels // groups, out_channels // groups, height, width)``
* ``bias`` usually has shape ``(1, out_channels, *1)``
"""
def __init__(
......@@ -685,9 +686,10 @@ class LocalConv2d(Conv2d):
.. note::
:attr:`weight` usually has shape ``(out_height, out_width, in_channels, height, width, in_channels)``,
if groups is not 1, shape will be ``(groups, out_height, out_width, in_channels // groups, height, width, out_channels // groups)``
:attr:`bias` usually has shape ``(1, out_channels, *1)``
* ``weight`` usually has shape ``(out_height, out_width, in_channels, height, width, in_channels)`` ,
if groups is not 1, shape will be ``(groups, out_height, out_width, in_channels // groups, height, width, out_channels // groups)``
* ``bias`` usually has shape ``(1, out_channels, *1)``
"""
def __init__(
......@@ -788,9 +790,9 @@ class DeformableConv2d(_ConvNd):
.. note::
:attr:`weight` usually has shape ``(out_channels, in_channels, height, width)``,
if groups is not 1, shape will be ``(groups, out_channels // groups, in_channels // groups, height, width)``
:attr:`bias` usually has shape ``(1, out_channels, *1)``
* ``weight`` usually has shape ``(out_channels, in_channels, height, width)`` ,
if groups is not 1, shape will be ``(groups, out_channels // groups, in_channels // groups, height, width)``
* ``bias`` usually has shape ``(1, out_channels, *1)``
"""
......@@ -898,8 +900,9 @@ class ConvTranspose3d(_ConvNd):
.. note::
:attr:`weight` usually has shape ``(in_channels, out_channels, depth, height, width)``.
:attr:`bias` usually has shape ``(1, out_channels, *1)``
* ``weight`` usually has shape ``(in_channels, out_channels, depth, height, width)`` .
* ``bias`` usually has shape ``(1, out_channels, *1)``
"""
def __init__(
......
......@@ -104,7 +104,7 @@ class AvgPool2d(_PoolNd):
:param stride: the stride of the window. Default value is kernel_size。
:param padding: implicit zero padding to be added on both sides.
:param mode: whether to count padding values. "average" mode will do counting and
"average_count_exclude_padding" mode won't do counting.
"average_count_exclude_padding" mode won't do counting.
Default: "average_count_exclude_padding"
Examples:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册