未验证 提交 8a2dd34a 编写于 作者: L LielinJiang 提交者: GitHub

fix depthwise conv (#29227)

上级 dbdeecd6
...@@ -143,9 +143,10 @@ class _ConvNd(layers.Layer): ...@@ -143,9 +143,10 @@ class _ConvNd(layers.Layer):
cudnn_version is not None) else False cudnn_version is not None) else False
self._op_type = "conv" + str(dims) + 'd' self._op_type = "conv" + str(dims) + 'd'
if dims == 2 and (in_channels == groups and in_channels != 1 and if self._op_type == 'conv2d' and (in_channels == groups and
out_channels % in_channels == 0): in_channels != 1 and
self.op_type = 'depthwise_conv2d' out_channels % in_channels == 0):
self._op_type = 'depthwise_conv2d'
self._use_cudnn = False self._use_cudnn = False
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册