From 62c5389bad0191c8574d7be58fc1564567b913ef Mon Sep 17 00:00:00 2001 From: qijun Date: Fri, 11 Nov 2016 10:50:24 +0000 Subject: [PATCH] fix test_layerHelpers unittest error --- python/paddle/trainer_config_helpers/layers.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/python/paddle/trainer_config_helpers/layers.py b/python/paddle/trainer_config_helpers/layers.py index 82c57e7f90a..a0a367f2d50 100644 --- a/python/paddle/trainer_config_helpers/layers.py +++ b/python/paddle/trainer_config_helpers/layers.py @@ -1827,7 +1827,6 @@ def img_pool_layer(input, pool_size, name=None, @layer_support() def spp_layer(input, name=None, num_channels=None, pool_type=None, pyramid_height=None, img_width=None, layer_attr=None): - pass """ Spatial Pyramid Pooling in Deep Convolutional Networks for Visual Recognition. The details please refer to @@ -1864,7 +1863,7 @@ def spp_layer(input, name=None, num_channels=None, pool_type=None, if (isinstance(pool_type, AvgPooling) or isinstance(pool_type, MaxPooling)): type_name += '-projection' - Layer( + l = Layer( name=name, type=LayerType.SPP_LAYER, inputs=Input(input.name, @@ -1875,8 +1874,8 @@ def spp_layer(input, name=None, num_channels=None, pool_type=None, ), **ExtraLayerAttribute.to_kwargs(layer_attr) ) - return LayerOutput(name, LayerType.SPP_LAYER, parents=[input], - num_filters=num_channels) + return LayerOutput(name, layer_type=LayerType.SPP_LAYER, parents=[input], + num_filters=num_channels, size=l.config.size) def __img_norm_layer__(name, input, size, norm_type, scale, power, -- GitLab