tmp fix depthwise_conv2d in dygraph (#21840)

test=develop
1.6.2
songyouwei 6 years ago committed by Leo Chen
parent 5bb9deb335
commit 63a5fb4cac

@ -180,10 +180,14 @@ class Conv2D(layers.Layer):
self._param_attr = param_attr self._param_attr = param_attr
self._bias_attr = bias_attr self._bias_attr = bias_attr
self._dtype = dtype self._dtype = dtype
if (self._num_channels == self._groups and
num_filters % self._num_channels == 0 and not self._use_cudnn): # TODO: recover the usage of depthwise_conv2d when it's
self._l_type = 'depthwise_conv2d' # kernel fixed https://github.com/PaddlePaddle/Paddle/issues/17098
else: # if (self._num_channels == self._groups and
# num_filters % self._num_channels == 0 and not self._use_cudnn):
# self._l_type = 'depthwise_conv2d'
# else:
# self._l_type = 'conv2d'
self._l_type = 'conv2d' self._l_type = 'conv2d'
self._num_channels = num_channels self._num_channels = num_channels

Loading…
Cancel
Save