From d8af44a5a3131eaa3eb13c3aee8de64b2b2e117c Mon Sep 17 00:00:00 2001 From: Jiabin Yang Date: Wed, 8 May 2019 20:38:35 +0800 Subject: [PATCH] test=develop, fix error with training and test on diff device (#17276) --- python/paddle/fluid/dygraph/nn.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/python/paddle/fluid/dygraph/nn.py b/python/paddle/fluid/dygraph/nn.py index 0ab981518be..d6360fedd47 100644 --- a/python/paddle/fluid/dygraph/nn.py +++ b/python/paddle/fluid/dygraph/nn.py @@ -161,11 +161,13 @@ class Conv2D(layers.Layer): raise ValueError("use_cudnn should be True or False") self._use_cudnn = use_cudnn self._num_channels = num_channels - 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' + # if (self._num_channels == self._groups and + # num_filters % self._num_channels == 0 and not self._use_cudnn): + # self._l_type = 'depthwise_conv2d' + # else: + # 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: num_filter_channels = num_channels -- GitLab