diff --git a/python/paddle/trainer/config_parser.py b/python/paddle/trainer/config_parser.py index 9610e52186f4cdc4ada4e575671ac7db5bbfdde2..2079aaa89f9b31d203af820770465c8deb4068f8 100644 --- a/python/paddle/trainer/config_parser.py +++ b/python/paddle/trainer/config_parser.py @@ -1811,9 +1811,6 @@ class DepthwiseConvLayer(LayerBase): use_gpu = int(g_command_config_args.get("use_gpu", 0)) parallel_nn = int(g_command_config_args.get("parallel_nn", 0)) - # Automatically select cudnn_type for GPU and exconv for CPU - # if set type=conv, but still reserve the way user specify - # exconv or cudnn_conv manually. self.layer_type = "depthwise_conv" # need to specify layer in config self.config.type = self.layer_type @@ -1824,7 +1821,7 @@ class DepthwiseConvLayer(LayerBase): for input_index in xrange(len(self.inputs)): input_layer = self.get_input_layer(input_index) conv_conf = self.config.inputs[input_index].conv_conf - #set the groups + #set the groups, the groups equals the input channels self.inputs[input_index].conv.groups = self.inputs[ input_index].conv.channels parse_conv(self.inputs[input_index].conv, input_layer.name, diff --git a/python/paddle/trainer_config_helpers/layers.py b/python/paddle/trainer_config_helpers/layers.py index c07c879191b439cdaa09c418ec76fe0a9d819f93..40ac3698bb20c0a68301154816bcdb0efb0d90a7 100755 --- a/python/paddle/trainer_config_helpers/layers.py +++ b/python/paddle/trainer_config_helpers/layers.py @@ -2337,6 +2337,7 @@ def img_depthwise_conv_layer(input, shared_biases=shared_biases, type=lt, **ExtraLayerAttribute.to_kwargs(layer_attr)) + return LayerOutput( name, lt,