未验证 提交 d8af44a5 编写于 作者: J Jiabin Yang 提交者: GitHub

test=develop, fix error with training and test on diff device (#17276)

上级 e388a1fb
...@@ -161,11 +161,13 @@ class Conv2D(layers.Layer): ...@@ -161,11 +161,13 @@ class Conv2D(layers.Layer):
raise ValueError("use_cudnn should be True or False") raise ValueError("use_cudnn should be True or False")
self._use_cudnn = use_cudnn self._use_cudnn = use_cudnn
self._num_channels = num_channels self._num_channels = num_channels
if (self._num_channels == self._groups and # if (self._num_channels == self._groups and
num_filters % self._num_channels == 0 and not self._use_cudnn): # num_filters % self._num_channels == 0 and not self._use_cudnn):
self._l_type = 'depthwise_conv2d' # self._l_type = 'depthwise_conv2d'
else: # else:
self._l_type = 'conv2d' # TODO(jiabin): recover the usage of depthwise_conv2d when it's
# kernel fixed https://github.com/PaddlePaddle/Paddle/issues/17275
self._l_type = 'conv2d'
if groups is None: if groups is None:
num_filter_channels = num_channels num_filter_channels = num_channels
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册