From 0152d97e6344fbf866d75bf24f6f6034a81f5e81 Mon Sep 17 00:00:00 2001 From: wanghaoshuang Date: Tue, 11 Jul 2017 10:23:29 +0800 Subject: [PATCH] fix pixel softmax python wrapper bug --- python/paddle/trainer/config_parser.py | 2 +- python/paddle/trainer_config_helpers/layers.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/python/paddle/trainer/config_parser.py b/python/paddle/trainer/config_parser.py index c24af47c4ba..261e834e118 100644 --- a/python/paddle/trainer/config_parser.py +++ b/python/paddle/trainer/config_parser.py @@ -3176,7 +3176,7 @@ class RecurrentLayerGroup(LayerBase): @config_layer('pixel_softmax') class PixelSoftmaxLayer(LayerBase): - def __init__(self, input, name, **xargs): + def __init__(self, name, inputs, **xargs): super(PixelSoftmaxLayer, self).__init__( name, 'pixel_softmax', 0, inputs=inputs, **xargs) diff --git a/python/paddle/trainer_config_helpers/layers.py b/python/paddle/trainer_config_helpers/layers.py index d8cc52d4098..2f8b0d10024 100755 --- a/python/paddle/trainer_config_helpers/layers.py +++ b/python/paddle/trainer_config_helpers/layers.py @@ -126,6 +126,7 @@ __all__ = [ 'row_conv_layer', 'dropout_layer', 'prelu_layer', + 'pixel_softmax_layer', ] @@ -5905,8 +5906,8 @@ def pixel_softmax_layer(input, name=None, layer_attr=None): else: assert isinstance(input, collections.Sequence) l = Layer( - inputs=[x.name for x in input], name=name, + inputs=[x.name for x in input], type=LayerType.PIXEL_SOFTMAX_LAYER, **ExtraLayerAttribute.to_kwargs(layer_attr)) return LayerOutput( -- GitLab