提交 3fc338ad 编写于 作者: Y Yu Yang 提交者: GitHub

Merge pull request #437 from QiJune/feature/sppnet

fix test_layerHelpers unittest error
...@@ -1827,7 +1827,6 @@ def img_pool_layer(input, pool_size, name=None, ...@@ -1827,7 +1827,6 @@ def img_pool_layer(input, pool_size, name=None,
@layer_support() @layer_support()
def spp_layer(input, name=None, num_channels=None, pool_type=None, def spp_layer(input, name=None, num_channels=None, pool_type=None,
pyramid_height=None, img_width=None, layer_attr=None): pyramid_height=None, img_width=None, layer_attr=None):
pass
""" """
Spatial Pyramid Pooling in Deep Convolutional Networks for Visual Recognition. Spatial Pyramid Pooling in Deep Convolutional Networks for Visual Recognition.
The details please refer to The details please refer to
...@@ -1864,7 +1863,7 @@ def spp_layer(input, name=None, num_channels=None, pool_type=None, ...@@ -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)): if (isinstance(pool_type, AvgPooling) or isinstance(pool_type, MaxPooling)):
type_name += '-projection' type_name += '-projection'
Layer( l = Layer(
name=name, name=name,
type=LayerType.SPP_LAYER, type=LayerType.SPP_LAYER,
inputs=Input(input.name, inputs=Input(input.name,
...@@ -1875,8 +1874,8 @@ def spp_layer(input, name=None, num_channels=None, pool_type=None, ...@@ -1875,8 +1874,8 @@ def spp_layer(input, name=None, num_channels=None, pool_type=None,
), ),
**ExtraLayerAttribute.to_kwargs(layer_attr) **ExtraLayerAttribute.to_kwargs(layer_attr)
) )
return LayerOutput(name, LayerType.SPP_LAYER, parents=[input], return LayerOutput(name, layer_type=LayerType.SPP_LAYER, parents=[input],
num_filters=num_channels) num_filters=num_channels, size=l.config.size)
def __img_norm_layer__(name, input, size, norm_type, scale, power, def __img_norm_layer__(name, input, size, norm_type, scale, power,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册