fix depthwise conv (#29227)

revert-31562-mean
LielinJiang 4 years ago committed by GitHub
parent dbdeecd665
commit 8a2dd34a1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -143,9 +143,10 @@ class _ConvNd(layers.Layer):
cudnn_version is not None) else False
self._op_type = "conv" + str(dims) + 'd'
if dims == 2 and (in_channels == groups and in_channels != 1 and
out_channels % in_channels == 0):
self.op_type = 'depthwise_conv2d'
if self._op_type == 'conv2d' and (in_channels == groups and
in_channels != 1 and
out_channels % in_channels == 0):
self._op_type = 'depthwise_conv2d'
self._use_cudnn = False

Loading…
Cancel
Save