diff --git a/docs/api/api_python/ops/mindspore.ops.Conv3D.rst b/docs/api/api_python/ops/mindspore.ops.Conv3D.rst index 7ad2634165b94581e087c9ee258e1a5d48952984..ee9598496be89ed47b23cd6bec5847c7edfb3e71 100644 --- a/docs/api/api_python/ops/mindspore.ops.Conv3D.rst +++ b/docs/api/api_python/ops/mindspore.ops.Conv3D.rst @@ -29,6 +29,10 @@ mindspore.ops.Conv3D :math:`dilation` 为三维卷积核膨胀尺寸, :math:`stride` 为移动步长, :math:`padding` 为在输入两侧的填充长度。 + .. note:: + 在Ascend平台上,目前只支持 :math:`group=1` 。 + + 参数: - **out_channel** (int) - 输出的通道数 :math:`C_{out}` 。 - **kernel_size** (Union[int, tuple[int]]) - 指定三维卷积核的深度、高度和宽度。可以为单个int或包含三个整数的Tuple。一个整数表示卷积核的深度、高度和宽度均为该值。包含三个整数的Tuple分别表示卷积核的深度、高度和宽度。 diff --git a/docs/api/api_python/ops/mindspore.ops.func_conv3d.rst b/docs/api/api_python/ops/mindspore.ops.func_conv3d.rst index 5a8100b8c62b5c63411aac931874a04f8fed0fc9..7e60d182aa31f4de94f52b8544b72ae501829473 100644 --- a/docs/api/api_python/ops/mindspore.ops.func_conv3d.rst +++ b/docs/api/api_python/ops/mindspore.ops.func_conv3d.rst @@ -21,7 +21,7 @@ mindspore.ops.conv3d .. note:: - 1. 在Ascend平台上,目前只支持深度卷积场景下的分组卷积运算。也就是说,当 `group>1` 的场景下,必须要满足 :math:`C_{in} = C_{out} = group` 的约束条件。 + 1. 在Ascend平台上,目前只支持 :math:`groups=1` 。 2. 在Ascend平台上,目前只支持 :math:`dialtion=1` 。 diff --git a/mindspore/python/mindspore/ops/function/nn_func.py b/mindspore/python/mindspore/ops/function/nn_func.py index d2a6c58d3626daff8bd33088d24cdb530b5f0a5c..5a44648508432dc33b2dca9f42888537a9bf6ea8 100644 --- a/mindspore/python/mindspore/ops/function/nn_func.py +++ b/mindspore/python/mindspore/ops/function/nn_func.py @@ -5143,8 +5143,7 @@ def conv3d(input, weight, bias=None, stride=1, pad_mode="valid", padding=0, dila Recognition `_ . Note: - 1. On Ascend platform, only group convolution in depthwise convolution scenarios is supported. - That is, when `groups>1`, condition :math:`C_{in} = C_{out} = groups` must be satisfied. + 1. On Ascend platform, :math:`groups = 1` must be satisfied. 2. On Ascend dilation on depth only supports the case of 1. Args: diff --git a/mindspore/python/mindspore/ops/operations/nn_ops.py b/mindspore/python/mindspore/ops/operations/nn_ops.py index d399dbd41708f00caf92e65e6b918ffa1e5b9506..0750f5eedff9ed4a042ba6fe8dcbdf24d8233762 100644 --- a/mindspore/python/mindspore/ops/operations/nn_ops.py +++ b/mindspore/python/mindspore/ops/operations/nn_ops.py @@ -1274,8 +1274,7 @@ class Conv2D(Primitive): `_. Note: - On Ascend platform, only group convolution in depthwise convolution scenarios is supported. - That is, when `group>1`, condition `in\_channels` = `out\_channels` = `group` must be satisfied. + On Ascend platform, :math:`group = 1` must be satisfied. Args: out_channel (int): The number of output channel :math:`C_{out}`. @@ -7775,8 +7774,8 @@ class Conv3D(Primitive): validator.check_value_type("group", group, (int,), self.name) validator.check_int_range(group, 1, out_channel, validator.INC_BOTH, "group", self.name) device_target = context.get_context("device_target") - if device_target == "Ascend" and group > 1 and out_channel != group: - raise ValueError("On Ascend platform, when group > 1, condition C_in = C_out = group must be satisfied.") + if device_target == "Ascend" and group != 1: + raise ValueError("On Ascend platform, group = 1 must be satisfied.") self.group = group self.add_prim_attr('groups', self.group)